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:
authorDavid Benson <david@jgraph.com>2018-03-16 18:43:15 +0300
committerDavid Benson <david@jgraph.com>2018-03-16 18:43:15 +0300
commit6ada7cec6c9c78fa483c71fb4661904bbdcdf773 (patch)
tree6394640c417cb06794bddfc1daa0d46330baba23
parentffa2ed998e4fd8e20790dd4185e0ffdd7589c2de (diff)
8.4.7 releasev8.4.7
Former-commit-id: 6fbaacfbbcb66de6ed93011c75874a44da511bb0
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java8
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/connect/confluence/connect-dev.json240
-rw-r--r--src/main/webapp/connect/jira/connect-dev.json93
-rw-r--r--src/main/webapp/js/app.min.js78
-rw-r--r--src/main/webapp/js/atlas-viewer.min.js72
-rw-r--r--src/main/webapp/js/atlas.min.js818
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js12
-rw-r--r--src/main/webapp/js/diagramly/ElectronApp.js19
-rw-r--r--src/main/webapp/js/embed-static.min.js74
-rw-r--r--src/main/webapp/js/mxgraph/Actions.js10
-rw-r--r--src/main/webapp/js/mxgraph/Dialogs.js8
-rw-r--r--src/main/webapp/js/mxgraph/Editor.js4
-rw-r--r--src/main/webapp/js/mxgraph/EditorUi.js15
-rw-r--r--src/main/webapp/js/mxgraph/Format.js5
-rw-r--r--src/main/webapp/js/mxgraph/Graph.js412
-rw-r--r--src/main/webapp/js/reader.min.js74
-rw-r--r--src/main/webapp/js/viewer.min.js72
-rw-r--r--src/main/webapp/plugins/voice.js47
21 files changed, 851 insertions, 1218 deletions
diff --git a/ChangeLog b/ChangeLog
index 9fbe3300..46295c9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+15-MAR-2018: 8.4.7
+
+- Improves Gliffy import
+
13-MAR-2018: 8.4.6
- Fixes adding of clones with new index
diff --git a/VERSION b/VERSION
index 2bb3bd41..6d5aa1b9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-8.4.6 \ No newline at end of file
+8.4.7 \ No newline at end of file
diff --git a/src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java b/src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java
index c5e289e7..5ed19da7 100644
--- a/src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java
+++ b/src/main/java/com/mxgraph/io/gliffy/model/GliffyObject.java
@@ -392,7 +392,7 @@ public class GliffyObject implements PostDeserializable
@Override
public void postDeserialize()
{
- if (isGroup())
+ if (isGroup() && hasChildren())
{
normalizeChildrenCoordinates();
adjustZOrder();
@@ -406,6 +406,12 @@ public class GliffyObject implements PostDeserializable
*/
private void normalizeChildrenCoordinates()
{
+ //Sometimes, a group does not have children
+ if (!hasChildren())
+ {
+ return;
+ }
+
//sorts the list to find the leftmost child and it's X
Comparator<GliffyObject> cx = new Comparator<GliffyObject>()
{
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index f0bda094..83185429 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 03/13/2018 05:13 PM
+# 03/15/2018 03:18 PM
app.html
index.html?offline=1
diff --git a/src/main/webapp/connect/confluence/connect-dev.json b/src/main/webapp/connect/confluence/connect-dev.json
deleted file mode 100644
index f8f5c05f..00000000
--- a/src/main/webapp/connect/confluence/connect-dev.json
+++ /dev/null
@@ -1,240 +0,0 @@
-{
- "name": "Draw.io gaudenz",
- "description": "Draw.io add-on for Confluence",
- "key": "com.mxgraph.confluence.plugins.diagramly",
- "baseUrl": "https://0d961297.ngrok.io/",
- "vendor":
- {
- "name": "JGraph Ltd.",
- "url": "https://www.jgraph.com"
- },
- "links": {
- "documentation": "https://support.draw.io/display/DFCC/draw.io+for+Confluence+Cloud"
- },
- "version": "1.1.0",
- "authentication":
- {
- "type": "none"
- },
- "modules":
- {
- "generalPages": [
- {
- "key": "lightbox",
- "url": "/connect/confluence/viewer2.html?lightbox=1",
- "name": {
- "value": "Lightbox"
- }
- }
- ],
- "adminPages": [
- {
- "key": "admin",
- "url": "/connect/confluence/admin.html",
- "name": {
- "value": "draw.io configuration"
- }
- }
- ],
- "dynamicContentMacros":
- [
- {
- "name":
- {
- "i18n": "drawioMacro",
- "value": "Draw.io Diagram"
- },
- "url": "/connect/confluence/viewer2.html?ceoId=${page.id}&diagramName=${diagramName}&revision=${revision}&width=${width}&height=${height}&tbstyle=${tbstyle}&lbox=${lbox}&zoom=${zoom}&links=${links}&owningPageId=${pageId}",
- "width": "100%",
- "description":
- {
- "i18n": "description",
- "value": "Inserts a new Draw.io Diagram"
- }, "icon":
- {
- "width": 128,
- "height": 128,
- "url": "/images/drawlogo128.png"
- },
- "categories": [
- "visuals"
- ],
- "outputType": "block",
- "featured": true,
- "key": "drawio",
- "parameters":
- [
- {
- "identifier": "diagramName",
- "name":
- {
- "value": "Diagram name (do not change)"
- },
- "type": "string"
- },
- {
- "identifier": "autoSize",
- "name":
- {
- "value": "automatic size"
- },
- "type": "boolean"
- },
- {
- "identifier": "PageId",
- "name":
- {
- "value": "Parent page ID"
- },
- "type": "string"
- },
- {
- "identifier": "baseUrl",
- "name":
- {
- "value": "Confluence Base URL"
- },
- "type": "string"
- },
- {
- "identifier": "width",
- "name":
- {
- "value": "Diagram width"
- },
- "type": "string"
- },
- {
- "identifier": "height",
- "name":
- {
- "value": "Diagram Height"
- },
- "type": "string"
- }
- ],
- "editor": {
- "url": "/connect/confluence/macroEditor.html?ceoId=${page.id}&diagramName=${diagramName}",
- "width": "100%",
- "height": "100%"
- },
- "imagePlaceholder": {
- "width": 500,
- "height": 300,
- "url": "/connectImage",
- "applyChrome": true
- },
- "renderModes": {
- "default": {
- "url": "/connectRender?pageId=${page.id}&diagramName=${diagramName}"
- }
- }
- },
- {
- "name":
- {
- "i18n": "drawioMacro",
- "value": "Legacy draw.io macro"
- },
- "url": "/connect/confluence/viewer.html?ceoId=${page.id}&diagramName=${diagramName}&revision=${revision}&width=${width}&height=${height}",
- "width": "100%",
- "description":
- {
- "i18n": "description",
- "value": "Do not use"
- }, "icon":
- {
- "width": 80,
- "height": 80,
- "url": "/images/stop-flat-icon-80.png"
- },
- "categories": [
- "visuals"
- ],
- "outputType": "block",
- "featured": false,
- "key": "drawio-macro",
- "parameters":
- [
- {
- "identifier": "diagramName",
- "name":
- {
- "value": "Diagram name (do not change)"
- },
- "type": "string"
- },
- {
- "identifier": "autoSize",
- "name":
- {
- "value": "automatic size"
- },
- "type": "boolean"
- },
- {
- "identifier": "PageId",
- "name":
- {
- "value": "Parent page ID"
- },
- "type": "string"
- },
- {
- "identifier": "baseUrl",
- "name":
- {
- "value": "Confluence Base URL"
- },
- "type": "string"
- },
- {
- "identifier": "width",
- "name":
- {
- "value": "Diagram width"
- },
- "type": "string"
- },
- {
- "identifier": "height",
- "name":
- {
- "value": "Diagram Height"
- },
- "type": "string"
- }
- ],
- "editor": {
- "url": "/connect/confluence/macroEditor.html?ceoId=${page.id}&diagramName=${diagramName}",
- "editTitle": {
- "value": "Edit MarkDown",
- "i18n": "macro.md.edit"
- },
- "insertTitle": {
- "value": "Insert New MarkDown",
- "i18n": "macro.md.insert"
- },
- "width": "100%",
- "height": "100%"
- },
- "imagePlaceholder": {
- "width": 500,
- "height": 300,
- "url": "/connectImage",
- "applyChrome": true
- },
- "renderModes": {
- "default": {
- "url": "/connectRender?pageId=${page.id}&diagramName=${diagramName}&revision=${revision}"
- }
- }
- }
- ]
- },
- "scopes": [
- "read",
- "write",
- "delete"
- ]
-} \ No newline at end of file
diff --git a/src/main/webapp/connect/jira/connect-dev.json b/src/main/webapp/connect/jira/connect-dev.json
deleted file mode 100644
index 16c3f277..00000000
--- a/src/main/webapp/connect/jira/connect-dev.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "name": "Draw.io gaudenz",
- "description": "Draw.io add-on for JIRA",
- "key": "com.mxgraph.jira.plugins.drawio.gaudenz",
- "baseUrl": "https://0d961297.ngrok.io/",
- "vendor": {
- "name": "JGraph Ltd.",
- "url": "https://www.jgraph.com"
- },
- "authentication":
- {
- "type": "none"
- },
- "version": "1.0.4",
- "scopes":
- [
- "READ",
- "WRITE",
- "DELETE"
- ],
- "modules":
- {
- "generalPages":
- [
- {
- "url":"/connect/jira/editor2.html?issueId=${issue.id}",
- "key":"drawioEditor",
- "name":
- {
- "value":"Draw.io Editor"
- },
- "location":"hidden"
- },
- {
- "url":"/connect/jira/fullScreenViewer2.html?issueId=${issue.id}",
- "key":"drawioFullScreenViewer",
- "name":
- {
- "value":"Draw.io Full Screen Viewer"
- },
- "location":"hidden"
- }
- ],
- "webItems": [
- {
- "location": "operations-attachments",
- "weight": 50,
- "key": "drawioEditorBlank",
- "url": "/connect/jira/editor2.html?issueId=${issue.id}",
- "name": {
- "value": "Add Draw.io Diagram"
- },
- "target":
- {
- "type":"dialog",
- "options":
- {
- "width":"100%",
- "height":"100%",
- "chrome":false
- }
- }
- },
- {
- "key": "drawioEditorDialog",
- "name":
- {
- "value": "Draw.io Editor"
- },
- "url": "/connect/jira/editor2.html?issueId=${issue.id}",
- "location": "none",
- "context": "addon"
- }
- ],
- "webPanels":
- [
- {
- "url": "/connect/jira/viewerPanel2.html?issueId=${issue.id}",
- "location": "atl.jira.view.issue.right.context",
- "layout":
- {
- "width": "300px"
- },
- "weight": 50,
- "key": "drawioViewerPanel",
- "name":
- {
- "value": "Draw.io Diagrams"
- }
- }
- ]
- }
- } \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 33059460..80d1b632 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -2522,42 +2522,42 @@ e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),thi
if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-
b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null==this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b)}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-
-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&(mxEvent.isLeftMouseButton(h)&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(g.openLink(this.currentLink,e?g.linkTarget:"_top"),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<
-f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};
-g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};
-Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
-!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==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.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||
-c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};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){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 h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",
-mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=
-e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var y=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,H){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",Math.round((e+q.fontSize)/2));t.setAttribute("fill",q.fontColor||"black");t.setAttribute("text-anchor",
-"middle");t.setAttribute("font-size",Math.round(q.fontSize)+"px");t.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration","underline");try{return y.innerHTML=f,t.textContent=y.value,t}catch(ia){return p.apply(this,
-arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var n=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&n.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=
-function(a){return new mxSvgCanvas2D(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,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=
-window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};
-Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;
-if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){b=null!=b?b:a;var c=document.createElement("a");c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",
-a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);40<b.length&&(b=b.substring(0,26)+"..."+b.substring(b.length-10));mxUtils.write(c,b);return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&
-null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),
-c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));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,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(W){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||
-!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.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 g=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}g.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
-mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,
-h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=
-g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);
-mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";
-this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var h=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,
-b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
-this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<
-this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",
-h.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
+g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,
+h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=
+e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];
+e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};
+Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==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.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=
+this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};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){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 h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+
+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform",
+"translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var y=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,H){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",
+Math.round((e+q.fontSize)/2));t.setAttribute("fill",q.fontColor||"black");t.setAttribute("text-anchor","middle");t.setAttribute("font-size",Math.round(q.fontSize)+"px");t.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration",
+"underline");try{return y.innerHTML=f,t.textContent=y.value,t}catch(ia){return p.apply(this,arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var n=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&n.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),
+l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(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,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=
+function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};
+Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&
+c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){b=null!=b?b:a;var c=document.createElement("a");
+c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);40<b.length&&(b=b.substring(0,26)+"..."+b.substring(b.length-10));mxUtils.write(c,b);return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
+function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,
+f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&
+this.isCellSelected(e.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));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,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(W){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=
+c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.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 g=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=
+a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}g.apply(this,arguments);
+mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=
+f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
+var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+
+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var h=mxCellEditor.prototype.resize;
+mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,
+mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*
+c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow=
+"",h.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
function(){try{this.graph.container.focus()}catch(H){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],
!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;
@@ -6662,8 +6662,8 @@ c,d){var g=document.createElement("input");g.type="checkbox";q.appendChild(g);g.
mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",k.checked);a.hideDialog()});n.className=
"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(n)):(d.appendChild(n),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var f=document.createElement("span");f.className="geSprite geSprite-delete";
f.style.position="relative";f.style.cursor="pointer";f.style.top="5px";f.style.marginRight="4px";f.style.display="inline-block";g.appendChild(f);mxUtils.write(g,e[d]);c.appendChild(g);mxUtils.br(c);mxEvent.addListener(f,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[c]+'"?',function(){e.splice(c,1);b()})}}(d))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var e=mxSettings.getPlugins().slice();
-d.appendChild(c);b();var f=mxUtils.button(mxResources.get("add"),function(){var c="",d=urlParams.p;if(null!=d&&0<d.length){for(var g=d.split(";"),d=0;d<g.length;d++){var f=App.pluginRegistry[g[d]];null!=f&&(c+=f+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){g=a.split(";");for(a=0;a<g.length;a++)0<g[a].length&&0>mxUtils.indexOf(e,g[a])&&e.push(g[a]);b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+
-")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
+d.appendChild(c);b();var f=mxUtils.button(mxResources.get("add"),function(){var c="",d=urlParams.p;if(null!=d&&0<d.length){for(var g=d.split(";"),d=0;d<g.length;d++){var f=App.pluginRegistry[g[d]];null!=f&&(c+=f+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){g=a.split(";");for(a=0;a<g.length;a++){var c=g[a],d=App.pluginRegistry[c];null!=d&&(c=d);0<c.length&&0>mxUtils.indexOf(e,c)&&e.push(c)}b()}},mxResources.get("enterValue")+
+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
m.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(h),g.appendChild(m),g.appendChild(f),g.appendChild(l)):(g.appendChild(m),g.appendChild(f),g.appendChild(l),g.appendChild(h));d.appendChild(g);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),
h=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");h.appendChild(l);f.appendChild(h);var h=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value="0";this.init=function(){k.focus();
k.select()};g.appendChild(k);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";g.appendChild(n);h.appendChild(m);h.appendChild(g);f.appendChild(h);h=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("right")+
@@ -6779,7 +6779,7 @@ k.appendChild(h);e=document.createElement("div");e.style.cssText="text-align:rig
d(!1)}),m.className="geBtn",e.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});m.className="geBtn gePrimaryBtn";e.appendChild(m);a.editor.cancelFirst||e.appendChild(h);k.appendChild(e);this.container=k};var v=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)):(v.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))}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.4.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.4.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&
diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js
index 9d236030..45dcd879 100644
--- a/src/main/webapp/js/atlas-viewer.min.js
+++ b/src/main/webapp/js/atlas-viewer.min.js
@@ -2332,42 +2332,42 @@ f.y;this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),thi
if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,g=this.getTolerance(),e=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(e,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=e.container.scrollLeft;this.scrollTop=e.container.scrollTop;null==this.currentLink&&"auto"==e.container.style.overflow&&(e.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(e.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-
d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>g||c>g)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!e.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d)}},mouseUp:function(a,c){for(var f=c.getSource(),h=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-
-e.container.scrollLeft)<g&&Math.abs(this.scrollTop-e.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&(mxEvent.isLeftMouseButton(h)&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(f=e.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(h,this.currentLink),mxEvent.isConsumed(h)||(e.openLink(this.currentLink,f?e.linkTarget:"_top"),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-e.container.scrollLeft)<
-g&&Math.abs(this.scrollTop-e.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=e.getAbsoluteUrl(e.getLinkForCell(a.cell));null!=this.currentLink&&(e.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=e.container&&(e.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};
-e.click=function(a){};e.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var g=this.cloneCells(a,!1),e=0;e<a.length;e++){var h=b.getParent(a[e]),p=this.moveCells([g[e]],c,c,!1)[0];f.push(p);if(d)b.add(h,g[e]);else{var n=h.getIndex(a[e]);b.add(h,g[e],n+1)}}}finally{b.endUpdate()}return f};
-Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],g=0;g<c.length;g++)f.push(c[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=f[g-1]){a[g].setAttribute("width",d);a[g].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
-!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var b=[],c=null,f=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var e=this.view.getState(d[g]);
-if(null!=e){var h=a?e.getCenterX():e.getCenterY(),c=null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;b.push(e)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});e=this.view.translate;h=this.view.scale;f=f/h-(a?e.x:e.y);c=c/h-(a?e.x:e.y);this.getModel().beginUpdate();try{for(var p=(c-f)/(b.length-1),c=f,g=1;g<b.length-1;g++){var n=this.view.getState(this.model.getParent(b[g].cell)),r=this.getCellGeometry(b[g].cell),c=c+p;null!=r&&null!=n&&(r=r.clone(),a?r.x=Math.round(c-r.width/2)-n.origin.x:
-r.y=Math.round(c-r.height/2)-n.origin.y,this.getModel().setGeometry(b[g].cell,r))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=this.view.getState(a[c]);if(null!=f){var g=this.getCellGeometry(d[c]);null==g||!g.relative||this.model.isEdge(a[c])||
-b.get(this.model.getParent(a[c]))||(g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;g=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(g,d[c]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,d,b,c,f,g,e){d=null!=d?d:1;b=null!=b?b:0;f=
-null!=f?f:!0;g=null!=g?g:!0;e=null!=e?e:!0;var h=g||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,n=mxUtils.createXmlDocument();c=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=c.style?c.style.backgroundColor=a:c.setAttribute("style","background-color:"+a));null==n.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",
-mxConstants.NS_XLINK)):c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/p;c.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*b)+"px");c.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*b)+"px");c.setAttribute("version","1.1");var r=c;f&&(r=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),r.setAttribute("transform","translate(0.5,0.5)"),c.appendChild(r));n.appendChild(c);n=this.createSvgCanvas(r);n.foOffset=
-f?-.5:0;n.textOffset=f?-.5:0;n.imageOffset=f?-.5:0;n.translate(Math.floor((b/d-h.x)/p),Math.floor((b/d-h.y)/p));var u=document.createElement("textarea"),x=n.createAlternateContent;n.createAlternateContent=function(a,d,b,c,f,g,e,h,n,p,r,k,q){var w=this.state;if(null!=this.foAltText&&(0==c||0!=w.fontSize&&g.length<5*c/w.fontSize)){var y=this.createElement("text");y.setAttribute("x",Math.round(c/2));y.setAttribute("y",Math.round((f+w.fontSize)/2));y.setAttribute("fill",w.fontColor||"black");y.setAttribute("text-anchor",
-"middle");y.setAttribute("font-size",Math.round(w.fontSize)+"px");y.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&y.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&y.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&y.setAttribute("text-decoration","underline");try{return u.innerHTML=g,y.textContent=u.value,y}catch(ga){return x.apply(this,
-arguments)}}else return x.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=p/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(h,f)&&n.image(d.x,d.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=e;e=this.createSvgImageExport();var k=e.drawCellState;e.drawCellState=function(a,d){(g||a.view.graph.isCellSelected(a.cell))&&k.apply(this,arguments)};e.drawState(this.getView().getState(this.model.root),n);return c};Graph.prototype.createSvgCanvas=
-function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d=
-window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),f=0;f<c;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};
-Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;
-if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,d){d=null!=d?d:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",
-a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<d.length&&(d=d.substring(0,26)+"..."+d.substring(d.length-10));mxUtils.write(b,d);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&
-null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,g,e){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),d=this.isCellSelected(g.getCell()),
-b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}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 d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(S){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||
-!mxEvent.isAltDown(a.getEvent())?m.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var l=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){l.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&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 q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}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)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
-mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,
-h.length-1));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,e=(mxUtils.getValue(a.style,
-mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;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)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=
-e?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);
-mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;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)+"px";this.textarea.style.textDecoration="";
-this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,
-d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
-this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<
-this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",
-t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
+e.container.scrollLeft)<g&&Math.abs(this.scrollTop-e.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(f=e.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":f?e.linkTarget:"_top",e.openLink(this.currentLink,
+h),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-e.container.scrollLeft)<g&&Math.abs(this.scrollTop-e.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=e.getAbsoluteUrl(e.getLinkForCell(a.cell));null!=this.currentLink&&(e.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=e.container&&(e.container.style.cursor=
+f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};e.click=function(a){};e.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var g=this.cloneCells(a,!1),e=0;e<a.length;e++){var h=b.getParent(a[e]),p=this.moveCells([g[e]],c,c,!1)[0];
+f.push(p);if(d)b.add(h,g[e]);else{var n=h.getIndex(a[e]);b.add(h,g[e],n+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],g=0;g<c.length;g++)f.push(c[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=f[g-1]){a[g].setAttribute("width",d);a[g].setAttribute("height",b);break}}};
+Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());
+if(null!=d&&1<d.length){for(var b=[],c=null,f=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var e=this.view.getState(d[g]);if(null!=e){var h=a?e.getCenterX():e.getCenterY(),c=null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;b.push(e)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});e=this.view.translate;h=this.view.scale;f=f/h-(a?e.x:e.y);c=c/h-(a?e.x:e.y);this.getModel().beginUpdate();try{for(var p=(c-f)/(b.length-1),c=f,g=1;g<b.length-1;g++){var n=this.view.getState(this.model.getParent(b[g].cell)),
+r=this.getCellGeometry(b[g].cell),c=c+p;null!=r&&null!=n&&(r=r.clone(),a?r.x=Math.round(c-r.width/2)-n.origin.x:r.y=Math.round(c-r.height/2)-n.origin.y,this.getModel().setGeometry(b[g].cell,r))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=
+this.view.getState(a[c]);if(null!=f){var g=this.getCellGeometry(d[c]);null==g||!g.relative||this.model.isEdge(a[c])||b.get(this.model.getParent(a[c]))||(g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;g=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(g,d[c]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});
+return a};Graph.prototype.getSvg=function(a,d,b,c,f,g,e){d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;g=null!=g?g:!0;e=null!=e?e:!0;var h=g||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,n=mxUtils.createXmlDocument();c=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=c.style?c.style.backgroundColor=a:c.setAttribute("style","background-color:"+
+a));null==n.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/p;c.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*b)+"px");c.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*b)+"px");c.setAttribute("version","1.1");var r=c;f&&(r=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),r.setAttribute("transform",
+"translate(0.5,0.5)"),c.appendChild(r));n.appendChild(c);n=this.createSvgCanvas(r);n.foOffset=f?-.5:0;n.textOffset=f?-.5:0;n.imageOffset=f?-.5:0;n.translate(Math.floor((b/d-h.x)/p),Math.floor((b/d-h.y)/p));var u=document.createElement("textarea"),x=n.createAlternateContent;n.createAlternateContent=function(a,d,b,c,f,g,e,h,n,p,r,k,q){var w=this.state;if(null!=this.foAltText&&(0==c||0!=w.fontSize&&g.length<5*c/w.fontSize)){var y=this.createElement("text");y.setAttribute("x",Math.round(c/2));y.setAttribute("y",
+Math.round((f+w.fontSize)/2));y.setAttribute("fill",w.fontColor||"black");y.setAttribute("text-anchor","middle");y.setAttribute("font-size",Math.round(w.fontSize)+"px");y.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&y.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&y.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&y.setAttribute("text-decoration",
+"underline");try{return u.innerHTML=g,y.textContent=u.value,y}catch(ga){return x.apply(this,arguments)}}else return x.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=p/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(h,f)&&n.image(d.x,d.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=e;e=this.createSvgImageExport();var k=e.drawCellState;e.drawCellState=function(a,d){(g||a.view.graph.isCellSelected(a.cell))&&k.apply(this,arguments)};e.drawState(this.getView().getState(this.model.root),
+n);return c};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=
+function(a){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),f=0;f<c;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};
+Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&
+b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,d){d=null!=d?d:a;var b=document.createElement("a");
+b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<d.length&&(d=d.substring(0,26)+"..."+d.substring(d.length-10));mxUtils.write(b,d);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
+function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,
+g,e){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),d=this.isCellSelected(g.getCell()),b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&
+this.isCellSelected(f.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}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 d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(S){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?m.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var l=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){l.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=
+b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&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 q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=
+a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}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)}q.apply(this,arguments);
+mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD,e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;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)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=
+g?"bold":"normal";this.textarea.style.fontStyle=e?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
+var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;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)+
+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;
+mxCellEditor.prototype.resize=function(a,d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,
+mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*
+b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow=
+"",t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var d=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
function(){try{this.graph.container.focus()}catch(J){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell],
!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var g=mxGraphHandler.prototype.moveCells;
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index dfc3ba23..f6e9d8c1 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -2522,42 +2522,42 @@ e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),thi
if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-
b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null==this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b)}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-
-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&(mxEvent.isLeftMouseButton(h)&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(g.openLink(this.currentLink,e?g.linkTarget:"_top"),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<
-f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};
-g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};
-Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
-!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==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.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||
-c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};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){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 h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",
-mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=
-e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var y=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,H){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",Math.round((e+q.fontSize)/2));t.setAttribute("fill",q.fontColor||"black");t.setAttribute("text-anchor",
-"middle");t.setAttribute("font-size",Math.round(q.fontSize)+"px");t.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration","underline");try{return y.innerHTML=f,t.textContent=y.value,t}catch(ia){return p.apply(this,
-arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var n=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&n.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=
-function(a){return new mxSvgCanvas2D(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,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=
-window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};
-Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;
-if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){b=null!=b?b:a;var c=document.createElement("a");c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",
-a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);40<b.length&&(b=b.substring(0,26)+"..."+b.substring(b.length-10));mxUtils.write(c,b);return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&
-null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),
-c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));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,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(W){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||
-!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.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 g=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}g.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
-mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,
-h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=
-g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);
-mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";
-this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var h=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,
-b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
-this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<
-this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",
-h.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
+g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,
+h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=
+e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];
+e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};
+Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==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.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=
+this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};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){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 h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+
+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform",
+"translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var y=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,H){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",
+Math.round((e+q.fontSize)/2));t.setAttribute("fill",q.fontColor||"black");t.setAttribute("text-anchor","middle");t.setAttribute("font-size",Math.round(q.fontSize)+"px");t.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration",
+"underline");try{return y.innerHTML=f,t.textContent=y.value,t}catch(ia){return p.apply(this,arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var n=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&n.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),
+l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(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,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=
+function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};
+Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&
+c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){b=null!=b?b:a;var c=document.createElement("a");
+c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);40<b.length&&(b=b.substring(0,26)+"..."+b.substring(b.length-10));mxUtils.write(c,b);return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
+function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,
+f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&
+this.isCellSelected(e.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));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,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(W){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=
+c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.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 g=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=
+a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}g.apply(this,arguments);
+mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=
+f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
+var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+
+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var h=mxCellEditor.prototype.resize;
+mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,
+mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*
+c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow=
+"",h.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
function(){try{this.graph.container.focus()}catch(H){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],
!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;
@@ -6437,31 +6437,31 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos",
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))])}})();
-DrawioFile=function(a,d){mxEventSource.call(this);this.ui=a;this.data=d||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,d,e,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,d,e){};DrawioFile.prototype.saveFile=function(a,d,e,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
-DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,e){};DrawioFile.prototype.isMovable=function(){return!1};
-DrawioFile.prototype.move=function(a,d,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){var e=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
+DrawioFile=function(a,e){mxEventSource.call(this);this.ui=a;this.data=e||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,e,d,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,e,d){};DrawioFile.prototype.saveFile=function(a,e,d,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
+DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,e,d){};DrawioFile.prototype.isMovable=function(){return!1};
+DrawioFile.prototype.move=function(a,e,d){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
+DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){var d=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"),
0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
-DrawioFile.prototype.autosave=function(a,d,e,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<d?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),
-mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
-DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,d){if(null!=a&&null!=d){var e=a.lastIndexOf("."),b=0<e?a.substring(e):"",e=d.lastIndexOf(".");return b===(0<e?d.substring(e):"")}return a==d};
-DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,d,e,b){DrawioFile.call(this,a,d);this.title=e;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,d,e){this.saveAs(this.title,d,e)};LocalFile.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};
-LocalFile.prototype.saveFile=function(a,d,e,b){this.title=a;this.updateFileData();d=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,g?"image/png":"text/xml",g);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(g?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(d)};LocalFile.prototype.rename=function(a,d,e){this.title=a;this.descriptorChanged();null!=d&&d()};
-LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,d,e){LocalFile.call(this,a,d,e)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,d,e){DrawioFile.call(this,a,d);this.title=e};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
-StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,d,e){this.saveAs(this.getTitle(),d,e)};StorageFile.prototype.saveAs=function(a,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,d,e)};
-StorageFile.prototype.saveFile=function(a,d,e,b){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=e&&e()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(e){this.isRenamable()&&this.getTitle()!=a&&null!=e?this.ui.confirm(mxResources.get("replaceIt",
-[a]),g,b):g()}))}else null!=e&&e()};StorageFile.prototype.rename=function(a,d,e){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,d)}),e)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),k,e):k()})):d()};
-StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,d,e){StorageFile.call(this,a,d,e)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,d,e){this.saveFile(a,!1,d,e)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(a,d,e){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,d,e){StorageFile.call(this,a,d,e);a=e;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,d,e){return!1};UrlLibrary.prototype.saveAs=function(a,d,e){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,d,e){function b(b,t,q,m,v,u){function g(){mxEvent.addListener(x,"click",null!=u?u:function(){q!=App.MODE_GOOGLE||a.isDriveDomain()?q==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,c.checked);d()})):(a.setMode(q,c.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
+DrawioFile.prototype.autosave=function(a,e,d,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<e?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}),
+mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=d&&d(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
+DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,e){if(null!=a&&null!=e){var d=a.lastIndexOf("."),b=0<d?a.substring(d):"",d=e.lastIndexOf(".");return b===(0<d?e.substring(d):"")}return a==e};
+DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,e,d,b){DrawioFile.call(this,a,e);this.title=d;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};
+LocalFile.prototype.saveFile=function(a,e,d,b){this.title=a;this.updateFileData();e=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,g?"image/png":"text/xml",g);else if(b.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(g?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=d&&d()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(e)};LocalFile.prototype.rename=function(a,e,d){this.title=a;this.descriptorChanged();null!=e&&e()};
+LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,e,d){LocalFile.call(this,a,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,e,d){DrawioFile.call(this,a,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
+StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(a,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,e,d)};
+StorageFile.prototype.saveFile=function(a,e,d,b){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=a&&null!=d?this.ui.confirm(mxResources.get("replaceIt",
+[a]),g,b):g()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,e,d){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,e)}),d)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),k,d):k()})):e()};
+StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,e,d){StorageFile.call(this,a,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageLibrary.prototype.isRenamable=function(a,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,e,d){StorageFile.call(this,a,e,d);a=d;e=a.lastIndexOf("/");0<=e&&(a=a.substring(e+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,e,d){return!1};UrlLibrary.prototype.saveAs=function(a,e,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,e,d){function b(b,t,q,m,v,u){function g(){mxEvent.addListener(x,"click",null!=u?u:function(){q!=App.MODE_GOOGLE||a.isDriveDomain()?q==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,c.checked);e()})):(a.setMode(q,c.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",t);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.overflow="hidden";if(null!=b){var w=document.createElement("img");
w.setAttribute("src",b);w.setAttribute("border","0");w.setAttribute("align","absmiddle");w.style.width="60px";w.style.height="60px";w.style.paddingBottom="6px";x.appendChild(w)}else y.style.paddingTop="5px",y.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(y.style.paddingTop="0px",y.style.marginTop="-2px");x.appendChild(y);mxUtils.write(y,t);if(null!=v)for(b=0;b<v.length;b++)mxUtils.br(y),mxUtils.write(y,v[b]);if(null!=m&&null==a[m]){w.style.visibility=
"hidden";mxUtils.setOpacity(y,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(x);var n=window.setTimeout(function(){null==a[m]&&(k.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[m]&&(window.clearTimeout(n),mxUtils.setOpacity(y,100),w.style.visibility="",k.stop(),g(),"drive"==m&&null!=h.parentNode&&h.parentNode.removeChild(h))}))}else g();
-p.appendChild(x);++f>=e&&(mxUtils.br(p),f=0)}e=null!=e?e:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=a.addLanguageMenu(g,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target",
+p.appendChild(x);++f>=d&&(mxUtils.br(p),f=0)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=a.addLanguageMenu(g,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target",
"_blank");k.style.position="absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("valign","bottom");n.setAttribute("src",Editor.helpImage);n.style.marginRight="2px";k.appendChild(n);mxUtils.write(k,mxResources.get("help"));g.appendChild(k)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer";
l.style.fontSize="12px";l.style.bottom="28px";l.style.color="gray";mxUtils.write(l,mxResources.get("decideLater"));a.isOfflineApp()?l.style.right="20px":(mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)"),l.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)l.style.marginLeft=-Math.round(l.clientWidth/2)+"px"};g.appendChild(l);mxEvent.addListener(l,"click",function(){a.hideDialog();var c=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,
null,null,null,null,null,!0);Editor.useLocalStorage=c});var p=document.createElement("div");mxClient.IS_QUIRKS&&(p.style.whiteSpace="nowrap",p.style.cssFloat="left");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";p.style.padding="12px 0px 12px 0px";var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;var f=0,h=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding=
@@ -6471,100 +6471,100 @@ a.getRecent();if(null!=q&&0<q.length){var t=document.createElement("select");t.s
a.id);mxUtils.write(f,a.title+" ("+mxResources.get(c)+")");t.appendChild(f)})(q[u]);k.appendChild(t);mxEvent.addListener(t,"change",function(c){""!=t.value&&a.loadFile(t.value)})}else k.style.marginTop="20px",p.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+
", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&(a.hideDialog(),a.openFiles(c.files,!0))});c.click()}),k.appendChild(q),p.style.paddingBottom="4px");p.appendChild(k);mxEvent.addListener(n,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&
"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(h.style.padding="8px",h.style.fontSize="9pt",h.style.marginTop="-14px",h.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(h))},
-5E3);this.container=g},SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";a.addLanguageMenu(d,!0);var e=null,b=a.getServiceCount();!a.isOffline()&&1<b&&(e=document.createElement("a"),e.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),e.setAttribute("title",mxResources.get("help")),e.setAttribute("target","_blank"),e.style.position="absolute",e.style.fontSize="12px",e.style.textDecoration="none",e.style.cursor="pointer",e.style.bottom=
-"22px",e.style.left="26px",e.style.color="gray",b=document.createElement("img"),b.setAttribute("border","0"),b.setAttribute("valign","bottom"),b.setAttribute("src",Editor.helpImage),b.style.marginRight="2px",e.appendChild(b),mxUtils.write(e,mxResources.get("help")),d.appendChild(e));b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("align",
-"absmiddle");g.style.width="40px";g.style.height="40px";g.style.marginRight="12px";g.style.paddingBottom="4px";var k="";a.mode==App.MODE_GOOGLE?(g.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive"),null!=e&&e.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Google+Drive")):a.mode==App.MODE_DROPBOX?(g.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox"),null!=e&&e.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Dropbox")):
-a.mode==App.MODE_ONEDRIVE?(g.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive"),null!=e&&e.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+OneDrive")):a.mode==App.MODE_GITHUB?(g.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):a.mode==App.MODE_TRELLO?(g.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(g.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):(g.src=IMAGE_PATH+"/osa_drive-harddisk.png",
-k=mxResources.get("device"));var n=document.createElement("div");n.style.margin="4px 0px 0px 0px";var l=document.createElement("button");l.className="geBigButton";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(n.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):(b.appendChild(g),mxUtils.write(b,k),d.appendChild(b),n.style.border="1px solid #d3d3d3",n.style.borderWidth="1px 0px 1px 0px",n.style.padding="18px 0px 24px 0px",l.style.marginBottom=
+5E3);this.container=g},SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";a.addLanguageMenu(e,!0);var d=null,b=a.getServiceCount();!a.isOffline()&&1<b&&(d=document.createElement("a"),d.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),d.setAttribute("title",mxResources.get("help")),d.setAttribute("target","_blank"),d.style.position="absolute",d.style.fontSize="12px",d.style.textDecoration="none",d.style.cursor="pointer",d.style.bottom=
+"22px",d.style.left="26px",d.style.color="gray",b=document.createElement("img"),b.setAttribute("border","0"),b.setAttribute("valign","bottom"),b.setAttribute("src",Editor.helpImage),b.style.marginRight="2px",d.appendChild(b),mxUtils.write(d,mxResources.get("help")),e.appendChild(d));b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("align",
+"absmiddle");g.style.width="40px";g.style.height="40px";g.style.marginRight="12px";g.style.paddingBottom="4px";var k="";a.mode==App.MODE_GOOGLE?(g.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Google+Drive")):a.mode==App.MODE_DROPBOX?(g.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+Dropbox")):
+a.mode==App.MODE_ONEDRIVE?(g.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive"),null!=d&&d.setAttribute("href","https://support.draw.io/display/DO/Using+draw.io+with+OneDrive")):a.mode==App.MODE_GITHUB?(g.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):a.mode==App.MODE_TRELLO?(g.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(g.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):(g.src=IMAGE_PATH+"/osa_drive-harddisk.png",
+k=mxResources.get("device"));var n=document.createElement("div");n.style.margin="4px 0px 0px 0px";var l=document.createElement("button");l.className="geBigButton";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(n.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):(b.appendChild(g),mxUtils.write(b,k),e.appendChild(b),n.style.border="1px solid #d3d3d3",n.style.borderWidth="1px 0px 1px 0px",n.style.padding="18px 0px 24px 0px",l.style.marginBottom=
"8px");mxClient.IS_QUIRKS&&(n.style.whiteSpace="nowrap",n.style.cssFloat="left");mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("createNewDiagram"));mxEvent.addListener(l,"click",function(){a.hideDialog();a.actions.get("new").funct()});n.appendChild(l);mxUtils.br(n);l=document.createElement("button");l.className="geBigButton";l.style.marginBottom="22px";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("openExistingDiagram"));
-mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});n.appendChild(l);e="undefined";a.mode==App.MODE_GOOGLE?e=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?e=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?e=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?e=mxResources.get("github"):a.mode==App.MODE_TRELLO?e=mxResources.get("trello"):a.mode==App.MODE_DEVICE?e=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(e=mxResources.get("browser"));mxClient.IS_CHROMEAPP||
+mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});n.appendChild(l);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||(g=function(b){l.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));l.style.marginBottom="16px";n.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});n.appendChild(c)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(l.style.marginBottom=
"24px",g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="6px",mxUtils.write(g,mxResources.get("changeUser")+" ("+b.displayName+")"),l.style.marginBottom="16px",n.style.paddingBottom="18px",mxEvent.addListener(g,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();
a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),n.appendChild(g)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?g(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?g(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&g(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&g(function(){a.dropbox.logout();
-a.openLink("https://www.dropbox.com/logout")}),g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="8px",mxUtils.write(g,mxResources.get("notUsingService",[e])),mxEvent.addListener(g,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),n.appendChild(g));d.appendChild(n);this.container=d},ConfirmDialog=function(a,d,e,b,g,k,n,l,p){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");
-f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,d);c.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var h=document.createElement("input");h.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(h.checked)});k.className="geBtn";null!=l&&(k.innerHTML=l+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop=
-"8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&f.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(h.checked)});f.appendChild(g);null!=n?(g.innerHTML=n+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(k);c.appendChild(f);p?(f.style.marginTop="10px",f=document.createElement("p"),
-f.style.marginTop="20px",f.appendChild(h),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),c.appendChild(f),mxEvent.addListener(n,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=c},ErrorDialog=function(a,d,e,b,g,k,n,l,p){p=null!=p?p:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=d){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px";
-f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="16px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";mxUtils.write(f,d);c.appendChild(f)}d=document.createElement("div");d.style.padding="6px";d.innerHTML=e;c.appendChild(d);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="right";null!=k&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),d.className="geBtn",e.appendChild(d),e.style.textAlign="center");var h=
-mxUtils.button(b,function(){p&&a.hideDialog();null!=g&&g()});h.className="geBtn";e.appendChild(h);null!=n&&(b=mxUtils.button(n,function(){p&&a.hideDialog();null!=l&&l()}),b.className="geBtn gePrimaryBtn",e.appendChild(b));this.init=function(){h.focus()};c.appendChild(e);this.container=c},EmbedDialog=function(a,d,e,b,g){b=document.createElement("div");var k=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);mxUtils.write(b,mxResources.get(5E5>d.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);
-var n=document.createElement("div");n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,a.formatFileSize(d.length));b.appendChild(n);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=
-mxResources.get("updatingDocument");b.appendChild(l);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>d.length?(l.value=d,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=d.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};n=document.createElement("div");n.style.position="absolute";n.style.bottom="36px";n.style.right="32px";var p=
-null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var c=5E5>d.length?l.value:d;if(null!=g)g(c);else if(k)try{var f=a.openLink(c);null!=f&&(null==e||0<e)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),
-e||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>");b.close()}}),p.className="geBtn",n.appendChild(p));if(!k||7500<d.length){var c=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",d,"text/plain")});c.className="geBtn";n.appendChild(c)}if(k&&(!a.isOffline()||
-mxClient.IS_CHROMEAPP)){if(51200>d.length){var f=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(c)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");f.appendChild(c);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+
-" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";n.appendChild(f)}7168>d.length&&(f=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(c)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width",
+a.openLink("https://www.dropbox.com/logout")}),g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="8px",mxUtils.write(g,mxResources.get("notUsingService",[d])),mxEvent.addListener(g,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),n.appendChild(g));e.appendChild(n);this.container=e},ConfirmDialog=function(a,e,d,b,g,k,n,l,p){var c=document.createElement("div");c.style.textAlign="center";var f=document.createElement("div");
+f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,e);c.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var h=document.createElement("input");h.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(h.checked)});k.className="geBtn";null!=l&&(k.innerHTML=l+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop=
+"8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&f.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(h.checked)});f.appendChild(g);null!=n?(g.innerHTML=n+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(k);c.appendChild(f);p?(f.style.marginTop="10px",f=document.createElement("p"),
+f.style.marginTop="20px",f.appendChild(h),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),c.appendChild(f),mxEvent.addListener(n,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=c},ErrorDialog=function(a,e,d,b,g,k,n,l,p){p=null!=p?p:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=e){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px";
+f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="16px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";mxUtils.write(f,e);c.appendChild(f)}e=document.createElement("div");e.style.padding="6px";e.innerHTML=d;c.appendChild(e);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=k&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),e.className="geBtn",d.appendChild(e),d.style.textAlign="center");var h=
+mxUtils.button(b,function(){p&&a.hideDialog();null!=g&&g()});h.className="geBtn";d.appendChild(h);null!=n&&(b=mxUtils.button(n,function(){p&&a.hideDialog();null!=l&&l()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){h.focus()};c.appendChild(d);this.container=c},EmbedDialog=function(a,e,d,b,g){b=document.createElement("div");var k=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);mxUtils.write(b,mxResources.get(5E5>e.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);
+var n=document.createElement("div");n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,a.formatFileSize(e.length));b.appendChild(n);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=
+mxResources.get("updatingDocument");b.appendChild(l);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>e.length?(l.value=e,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};n=document.createElement("div");n.style.position="absolute";n.style.bottom="36px";n.style.right="32px";var p=
+null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var c=5E5>e.length?l.value:e;if(null!=g)g(c);else if(k)try{var f=a.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),
+d||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>");b.close()}}),p.className="geBtn",n.appendChild(p));if(!k||7500<e.length){var c=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",e,"text/plain")});c.className="geBtn";n.appendChild(c)}if(k&&(!a.isOffline()||
+mxClient.IS_CHROMEAPP)){if(51200>e.length){var f=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(c)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");f.appendChild(c);f.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+
+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";n.appendChild(f)}7168>e.length&&(f=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(c)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width",
"18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",f.appendChild(c),f.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",n.appendChild(f))}c=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});n.appendChild(c);f=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?c.className="geBtn gePrimaryBtn":(n.appendChild(f),f.className="geBtn gePrimaryBtn",c.className="geBtn"):(n.appendChild(p),c.className="geBtn",p.className="geBtn gePrimaryBtn");b.appendChild(n);this.container=b};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,d){function e(){var a=null!=A.getTitle()?A.getTitle():this.defaultFilename;if(z.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<D.length&&(b+="&s="+D);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=h.value&&(b+="&height="+h.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+
+mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?c.className="geBtn gePrimaryBtn":(n.appendChild(f),f.className="geBtn gePrimaryBtn",c.className="geBtn"):(n.appendChild(p),c.className="geBtn",p.className="geBtn gePrimaryBtn");b.appendChild(n);this.container=b};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,e){function d(){var a=null!=A.getTitle()?A.getTitle():this.defaultFilename;if(z.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<D.length&&(b+="&s="+D);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=h.value&&(b+="&height="+h.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+
(m.checked?"1":"0");b+="&x0="+Number(f.value);b+="&y0="+p;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
encodeURIComponent(a)),""!=h.value&&(a=parseInt(h.value)+parseInt(f.value),b+="&height="+a),c.value=b):c.value=""}var b=document.createElement("div"),g=a.editor.graph,k=g.getGraphBounds(),n=g.view.scale,l=Math.floor(k.x/n-g.view.translate.x),p=Math.floor(k.y/n-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";b.appendChild(c);
mxUtils.br(b);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=l;b.appendChild(f);mxUtils.write(b,mxResources.get("height")+":");var h=document.createElement("input");h.setAttribute("type",
-"text");h.setAttribute("size","4");h.style.marginLeft="4px";h.value=Math.ceil(k.height/n);b.appendChild(h);mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=d||"";
+"text");h.setAttribute("size","4");h.style.marginLeft="4px";h.value=Math.ceil(k.height/n);b.appendChild(h);mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=e||"";
b.appendChild(q);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";b.appendChild(t);mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";b.appendChild(u);mxUtils.write(b,mxResources.get("pan")+" ");var w=document.createElement("input");
w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";b.appendChild(w);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
mxResources.get("asNew")+" ");mxUtils.br(b);var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;m.style.marginLeft="16px";b.appendChild(m);mxUtils.write(b,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft=
-"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var D=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(u,"change",e);mxEvent.addListener(w,"change",e);mxEvent.addListener(m,"change",e);mxEvent.addListener(v,"change",e);mxEvent.addListener(x,"change",e);mxEvent.addListener(y,"change",e);mxEvent.addListener(z,"change",e);mxEvent.addListener(h,"change",e);mxEvent.addListener(f,"change",e);mxEvent.addListener(t,"change",e);mxEvent.addListener(q,"change",e);e();
-mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});n.className="geBtn gePrimaryBtn";k.appendChild(n);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,d,e){var b=document.createElement("div");b.style.textAlign=
-"right";this.init=function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);b.appendChild(d);var k=new Graph(d);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var n="curved=1;";k.cellRenderer.installCellOverlayListeners=
+"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var D=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(u,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(m,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(q,"change",d);d();
+mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});n.className="geBtn gePrimaryBtn";k.appendChild(n);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,e,d){var b=document.createElement("div");b.style.textAlign=
+"right";this.init=function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);b.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var n="curved=1;";k.cellRenderer.installCellOverlayListeners=
function(a,c,f){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(f.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(f.node,"touchstart",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,n);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=k.getDefaultParent(),p=mxUtils.bind(this,function(a){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,f){k.connectionHandler.reset();k.clearSelection();var b=k.getCellGeometry(a),m;h(function(){m=k.insertVertex(l,null,"Entry",b.x,b.y,80,30,"rounded=1;");p(m);k.view.refresh(m);
k.insertEdge(l,null,"",a,m,n)},function(){k.scrollCellToVisible(m)})});c.addListener("pointerdown",function(a,c){var f=c.getProperty("event"),b=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var m=mxUtils.convertPoint(k.container,mxEvent.getClientX(f),mxEvent.getClientY(f));k.connectionHandler.start(b,m.x,m.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(f);mxEvent.consume(f)});k.addCellOverlay(a,c)});k.getModel().beginUpdate();var c;try{c=k.insertVertex(l,null,"Start",
-0,0,80,30,"ellipse"),p(c)}finally{k.getModel().endUpdate()}var f;"horizontalTree"==e?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==e?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==e?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==e?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-e?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==e?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==e&&(f=new mxCircleLayout(k));if(null!=f){var h=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),f.execute(k.getDefaultParent(),c)}catch(m){throw m;}finally{var h=new mxMorphing(k);h.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));h.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,c,f,b,t){q.apply(this,arguments);h()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);h()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){h()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
-var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),f=a.editor.graph.view,b=f.getBounds(c);b.x-=f.translate.x;b.y-=f.translate.y;a.editor.graph.scrollRectToVisible(b);a.editor.graph.setSelectionCells(c);null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(t)};this.container=b};
+0,0,80,30,"ellipse"),p(c)}finally{k.getModel().endUpdate()}var f;"horizontalTree"==d?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==d?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(k));if(null!=f){var h=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),f.execute(k.getDefaultParent(),c)}catch(m){throw m;}finally{var h=new mxMorphing(k);h.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));h.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,c,f,b,t){q.apply(this,arguments);h()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);h()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){h()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
+var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),f=a.editor.graph.view,b=f.getBounds(c);b.x-=f.translate.x;b.y-=f.translate.y;a.editor.graph.scrollRectToVisible(b);a.editor.graph.setSelectionCells(c);null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()});b.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(t)};this.container=b};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(a,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";e.appendChild(b);mxUtils.write(e,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(e);var b=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value=
-null!=b?b.src:"";var k=!1,n=function(){k||""==g.value||a.isOffline()?(l.value="",p.value=""):a.loadImage(mxUtils.trim(g.value),function(a){l.value=a.width;p.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";l.value="";p.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=e.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(a){null!=
+var BackgroundImageDialog=function(a,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";d.appendChild(b);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var b=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value=
+null!=b?b.src:"";var k=!1,n=function(){k||""==g.value||a.isOffline()?(l.value="",p.value=""):a.loadImage(mxUtils.trim(g.value),function(a){l.value=a.width;p.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";l.value="";p.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=d.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(a){null!=
f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,c,f,b,h,t){g.value=a;n()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&(g.value=decodeURIComponent(b),n())}c.stopPropagation();c.preventDefault()}),!1)}};e.appendChild(g);mxUtils.br(e);mxUtils.br(e);mxUtils.write(e,mxResources.get("width")+":");var l=document.createElement("input");
-l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=b?b.width:"";e.appendChild(l);mxUtils.write(e,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=b?b.height:"";e.appendChild(p);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";l.value="";p.value="";k=!1});mxEvent.addListener(b,"mousedown",
-function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";e.appendChild(b);mxUtils.br(e);mxEvent.addListener(g,"change",n);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url,n()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&(g.value=decodeURIComponent(b),n())}c.stopPropagation();c.preventDefault()}),!1)}};d.appendChild(g);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var l=document.createElement("input");
+l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=b?b.width:"";d.appendChild(l);mxUtils.write(d,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=b?b.height:"";d.appendChild(p);b=mxUtils.button(mxResources.get("reset"),function(){g.value="";l.value="";p.value="";k=!1});mxEvent.addListener(b,"mousedown",
+function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(g,"change",n);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url,n()));g.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
f.className="geBtn";b.appendChild(f);null!=a.drive&&"1"==urlParams.photos&&(f=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d(""!=g.value?new mxImage(mxUtils.trim(g.value),l.value,p.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(c);e.appendChild(b);this.container=e},ParseDialog=function(a,d){function e(c,f){var b=c.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==
-f||"plantUmlTxt"==f){var b="plantUmlTxt"==f?"https://exp.draw.io/plantuml2/txt/":"plantUmlPng"==f?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",h=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var e=function(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?"_":"?"},t=function(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;
-c4=b&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)},m=new XMLHttpRequest;m.open("GET",b+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+t(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+t(a.charCodeAt(k),0,0):r+t(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(h.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);"plantUmlTxt"!=f&&(m.responseType="blob");m.onload=function(b){if(200<=this.status&&300>this.status)if("plantUmlTxt"==f){a.spinner.stop();
-h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,"<pre>"+this.response+"</pre>",g.x,g.y,1,1,"text;html=1;overflow=fill;"),h.updateCellSize(cell,!0)}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())}else b=new FileReader,b.readAsDataURL(this.response),b.onload=function(b){var f=new Image;f.onload=function(){a.spinner.stop();var m=f.width,d=f.height;if(0==m&&0==d){var e=b.target.result,t=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(t+
-1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");0<e.length&&(m=parseFloat(e[0].getAttribute("width")),d=parseFloat(e[0].getAttribute("height")))}h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,c,g.x,g.y,m,d,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(b.target.result)+";")}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())};f.src=b.target.result},b.onerror=function(c){a.handleError(c)};
-else a.spinner.stop(),a.handleError(b)};m.onerror=function(c){a.handleError(c)};m.send()}}else if("table"==f){for(var v=null,d=[],q=0,k=0;k<b.length;k++)if(m=mxUtils.trim(b[k]),"create table"==m.substring(0,12).toLowerCase())m=mxUtils.trim(m.substring(12)),"("==m.charAt(m.length-1)&&(m=m.substring(0,m.lastIndexOf(" "))),v=new mxCell(m,new mxGeometry(q,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
-v.vertex=!0,d.push(v),m=a.editor.graph.getPreferredSizeForCell(l),null!=m&&(v.geometry.width=m.width+10);else if(null!=v&&")"==m.charAt(0))q+=v.geometry.width+40,v=null;else if("("!=m&&null!=v&&(m=m.substring(0,","==m.charAt(m.length-1)?m.length-1:m.length),"primary key"!=m.substring(0,11).toLowerCase())){var n=m.toLowerCase().indexOf("primary key"),m=m.replace(/primary key/i,""),l=new mxCell(m,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
-l.vertex=!0;m=sb.cloneCell(l,0<n?"PK":"");m.connectable=!1;m.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";m.geometry.width=30;m.geometry.height=26;l.insert(m);m=a.editor.graph.getPreferredSizeForCell(l);null!=m&&v.geometry.width<m.width+10&&(v.geometry.width=Math.min(220,m.width+10));v.insert(l);v.geometry.height+=26}0<d.length&&(h=a.editor.graph,
-b=h.view,m=h.getGraphBounds(),h.setSelectionCells(h.importCells(d,Math.ceil(Math.max(0,m.x/b.scale-b.translate.x)+4*h.gridSize),Math.ceil(Math.max(0,(m.y+m.height)/b.scale-b.translate.y)+4*h.gridSize))),h.scrollCellToVisible(h.getSelectionCell()))}else if("list"==f){if(0<b.length){h=a.editor.graph;v=new mxCell(b[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
+a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),f.className="geBtn",b.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e(""!=g.value?new mxImage(mxUtils.trim(g.value),l.value,p.value):null)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},ParseDialog=function(a,e){function d(c,f){var b=c.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==
+f||"plantUmlTxt"==f){var b="plantUmlTxt"==f?"https://exp.draw.io/plantuml2/txt/":"plantUmlPng"==f?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",h=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=function(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?"_":"?"},t=function(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;
+c4=b&63;r="";r+=d(c1&63);r+=d(c2&63);r+=d(c3&63);return r+=d(c4&63)},m=new XMLHttpRequest;m.open("GET",b+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+t(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+t(a.charCodeAt(k),0,0):r+t(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(h.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);"plantUmlTxt"!=f&&(m.responseType="blob");m.onload=function(b){if(200<=this.status&&300>this.status)if("plantUmlTxt"==f){a.spinner.stop();
+h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,"<pre>"+this.response+"</pre>",g.x,g.y,1,1,"text;html=1;overflow=fill;"),h.updateCellSize(cell,!0)}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())}else b=new FileReader,b.readAsDataURL(this.response),b.onload=function(b){var f=new Image;f.onload=function(){a.spinner.stop();var m=f.width,e=f.height;if(0==m&&0==e){var d=b.target.result,t=d.indexOf(","),d=decodeURIComponent(escape(atob(d.substring(t+
+1)))),d=mxUtils.parseXml(d).getElementsByTagName("svg");0<d.length&&(m=parseFloat(d[0].getAttribute("width")),e=parseFloat(d[0].getAttribute("height")))}h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,c,g.x,g.y,m,e,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(b.target.result)+";")}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())};f.src=b.target.result},b.onerror=function(c){a.handleError(c)};
+else a.spinner.stop(),a.handleError(b)};m.onerror=function(c){a.handleError(c)};m.send()}}else if("table"==f){for(var v=null,e=[],q=0,k=0;k<b.length;k++)if(m=mxUtils.trim(b[k]),"create table"==m.substring(0,12).toLowerCase())m=mxUtils.trim(m.substring(12)),"("==m.charAt(m.length-1)&&(m=m.substring(0,m.lastIndexOf(" "))),v=new mxCell(m,new mxGeometry(q,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
+v.vertex=!0,e.push(v),m=a.editor.graph.getPreferredSizeForCell(l),null!=m&&(v.geometry.width=m.width+10);else if(null!=v&&")"==m.charAt(0))q+=v.geometry.width+40,v=null;else if("("!=m&&null!=v&&(m=m.substring(0,","==m.charAt(m.length-1)?m.length-1:m.length),"primary key"!=m.substring(0,11).toLowerCase())){var n=m.toLowerCase().indexOf("primary key"),m=m.replace(/primary key/i,""),l=new mxCell(m,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+l.vertex=!0;m=sb.cloneCell(l,0<n?"PK":"");m.connectable=!1;m.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";m.geometry.width=30;m.geometry.height=26;l.insert(m);m=a.editor.graph.getPreferredSizeForCell(l);null!=m&&v.geometry.width<m.width+10&&(v.geometry.width=Math.min(220,m.width+10));v.insert(l);v.geometry.height+=26}0<e.length&&(h=a.editor.graph,
+b=h.view,m=h.getGraphBounds(),h.setSelectionCells(h.importCells(e,Math.ceil(Math.max(0,m.x/b.scale-b.translate.x)+4*h.gridSize),Math.ceil(Math.max(0,(m.y+m.height)/b.scale-b.translate.y)+4*h.gridSize))),h.scrollCellToVisible(h.getSelectionCell()))}else if("list"==f){if(0<b.length){h=a.editor.graph;v=new mxCell(b[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
v.vertex=!0;m=h.getPreferredSizeForCell(v);null!=m&&v.geometry.width<m.width+10&&(v.geometry.width=m.width+10);l=[v];if(1<b.length)for(k=1;k<b.length;k++)"--"==b[k]?(m=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),m.vertex=!0,v.geometry.height+=m.geometry.height,v.insert(m),l.push(m)):0<b[k].length&&";"!=b[k].charAt(0)&&(q=new mxCell(b[k],
new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),q.vertex=!0,m=h.getPreferredSizeForCell(q),null!=m&&q.geometry.width<m.width&&(q.geometry.width=m.width),v.geometry.width=Math.max(v.geometry.width,q.geometry.width),v.geometry.height+=q.geometry.height,v.insert(q),l.push(q));h.getModel().beginUpdate();try{v=h.importCells([v],g.x,g.y)[0],h.fireEvent(new mxEventObject("cellsInserted",
-"cells",[v].concat(v.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(v);h.scrollCellToVisible(h.getSelectionCell())}}else{for(var l=function(a){var c=p[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,p[a]=c,d.push(c));return c},p={},d=[],k=0;k<b.length;k++)if(";"!=b[k].charAt(0)){var C=b[k].split("->");2<=C.length&&(q=l(C[0]),n=l(C[C.length-1]),C=new mxCell(2<C.length?C[1]:"",new mxGeometry),C.edge=!0,q.insertEdge(C,!0),n.insertEdge(C,!1),
-d.push(C))}if(0<d.length){b=document.createElement("div");b.style.visibility="hidden";document.body.appendChild(b);h=new Graph(b);h.getModel().beginUpdate();try{d=h.importCells(d);for(k=0;k<d.length;k++)h.getModel().isVertex(d[k])&&(m=h.getPreferredSizeForCell(d[k]),d[k].geometry.width=Math.max(d[k].geometry.width,m.width),d[k].geometry.height=Math.max(d[k].geometry.height,m.height));v=new mxFastOrganicLayout(h);v.disableEdgeStyle=!1;v.forceConstant=120;v.execute(h.getDefaultParent())}finally{h.getModel().endUpdate()}h.clearCellOverlays();
+"cells",[v].concat(v.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(v);h.scrollCellToVisible(h.getSelectionCell())}}else{for(var l=function(a){var c=p[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,p[a]=c,e.push(c));return c},p={},e=[],k=0;k<b.length;k++)if(";"!=b[k].charAt(0)){var C=b[k].split("->");2<=C.length&&(q=l(C[0]),n=l(C[C.length-1]),C=new mxCell(2<C.length?C[1]:"",new mxGeometry),C.edge=!0,q.insertEdge(C,!0),n.insertEdge(C,!1),
+e.push(C))}if(0<e.length){b=document.createElement("div");b.style.visibility="hidden";document.body.appendChild(b);h=new Graph(b);h.getModel().beginUpdate();try{e=h.importCells(e);for(k=0;k<e.length;k++)h.getModel().isVertex(e[k])&&(m=h.getPreferredSizeForCell(e[k]),e[k].geometry.width=Math.max(e[k].geometry.width,m.width),e[k].geometry.height=Math.max(e[k].geometry.height,m.height));v=new mxFastOrganicLayout(h);v.disableEdgeStyle=!1;v.forceConstant=120;v.execute(h.getDefaultParent())}finally{h.getModel().endUpdate()}h.clearCellOverlays();
l=[];a.editor.graph.getModel().beginUpdate();try{l=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),g.x,g.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());h.destroy();b.parentNode.removeChild(b)}}}function b(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
"table"==l.value?"CREATE TABLE Persons\n(\nPersonID int NOT NULL PRIMARY KEY,\nLastName varchar(255),\nFirstName varchar(255),\nAddress varchar(255),\nCity varchar(255)\n);":"plantUmlPng"==l.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":"plantUmlSvg"==l.value||"plantUmlTxt"==l.value?
"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var g=a.editor.graph.getFreeInsertPoint(),k=document.createElement("div");k.style.textAlign="right";var n=document.createElement("textarea");n.style.resize="none";n.style.width="100%";n.style.height="354px";n.style.marginBottom="16px";
var l=document.createElement("select"),p=document.createElement("option");p.setAttribute("value","list");p.setAttribute("selected","selected");mxUtils.write(p,mxResources.get("list"));l.appendChild(p);p=document.createElement("option");p.setAttribute("value","table");mxUtils.write(p,mxResources.get("table"));l.appendChild(p);p=document.createElement("option");p.setAttribute("value","diagram");mxUtils.write(p,mxResources.get("diagram"));l.appendChild(p);p=document.createElement("option");p.setAttribute("value",
"plantUmlSvg");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(p),l.appendChild(c),
l.appendChild(f));var h=b();n.value=h;k.appendChild(n);this.init=function(){n.focus()};Graph.fileSupport&&(n.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),n.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){n.value=a.target.result};c.readAsText(a)}},!1));k.appendChild(l);mxEvent.addListener(l,"change",function(){var a=b();if(0==n.value.length||
-n.value==h)h=a,n.value=h});p=mxUtils.button(mxResources.get("close"),function(){n.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&k.appendChild(p);c=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();e(n.value,l.value)});k.appendChild(c);c.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(p);this.container=k},NewDialog=function(a,d,e,b,g,k,n,l,p,c,f,h,q,t,u){function w(){for(var a=
-!0;H<N.length&&(a||0!=mxUtils.mod(H,30));)a=N[H++],m(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function x(){if(M)a.hideDialog(),t(M,R,G.value);else if(b)e||a.hideDialog(),b(T,G.value);else{var c=G.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(b){a.createFile(c,T,null!=S&&0<S.length?S:null,null,function(){a.hideDialog()},
-null,b)})}}function y(a,c,b,f,m){null!=P&&(P.style.backgroundColor="transparent",P.style.border="1px solid transparent");E.removeAttribute("disabled");T=c;S=b;P=a;M=f;R=m;P.style.backgroundColor=l;P.style.border=p}function m(a,c,b,f,m,h,e,d){var t=document.createElement("div");t.className="geTemplate";t.style.height=Y+"px";t.style.width=U+"px";null!=f&&0<f.length&&t.setAttribute("title",f);if(null!=h)t.style.backgroundImage="url("+h+")",t.style.backgroundSize="contain",t.style.backgroundPosition=
-"center center",t.style.backgroundRepeat="no-repeat",mxEvent.addListener(t,"click",function(c){y(t,null,null,a,e)}),mxEvent.addListener(t,"dblclick",function(a){x()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);t.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(t,"click",function(b){E.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";
-t.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y(t,a.getText(),c),v&&x())}))});mxEvent.addListener(t,"dblclick",function(a){v=!0})}else t.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(b)+"</td></tr></table>",m&&y(t),null!=d?mxEvent.addListener(t,"click",d):(mxEvent.addListener(t,"click",function(a){y(t)}),mxEvent.addListener(t,"dblclick",function(a){x()}));
+n.value==h)h=a,n.value=h});p=mxUtils.button(mxResources.get("close"),function(){n.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});p.className="geBtn";a.editor.cancelFirst&&k.appendChild(p);c=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();d(n.value,l.value)});k.appendChild(c);c.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(p);this.container=k},NewDialog=function(a,e,d,b,g,k,n,l,p,c,f,h,q,t,u){function w(){for(var a=
+!0;H<N.length&&(a||0!=mxUtils.mod(H,30));)a=N[H++],m(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function x(){if(M)a.hideDialog(),t(M,R,G.value);else if(b)d||a.hideDialog(),b(T,G.value);else{var c=G.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(b){a.createFile(c,T,null!=S&&0<S.length?S:null,null,function(){a.hideDialog()},
+null,b)})}}function y(a,c,b,f,m){null!=P&&(P.style.backgroundColor="transparent",P.style.border="1px solid transparent");E.removeAttribute("disabled");T=c;S=b;P=a;M=f;R=m;P.style.backgroundColor=l;P.style.border=p}function m(a,c,b,f,m,h,d,e){var t=document.createElement("div");t.className="geTemplate";t.style.height=Y+"px";t.style.width=U+"px";null!=f&&0<f.length&&t.setAttribute("title",f);if(null!=h)t.style.backgroundImage="url("+h+")",t.style.backgroundSize="contain",t.style.backgroundPosition=
+"center center",t.style.backgroundRepeat="no-repeat",mxEvent.addListener(t,"click",function(c){y(t,null,null,a,d)}),mxEvent.addListener(t,"dblclick",function(a){x()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);t.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(t,"click",function(b){E.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";
+t.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y(t,a.getText(),c),v&&x())}))});mxEvent.addListener(t,"dblclick",function(a){v=!0})}else t.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(b)+"</td></tr></table>",m&&y(t),null!=e?mxEvent.addListener(t,"click",e):(mxEvent.addListener(t,"click",function(a){y(t)}),mxEvent.addListener(t,"dblclick",function(a){x()}));
I.appendChild(t)}function v(){mxEvent.addListener(I,"scroll",function(a){I.scrollTop+I.clientHeight>=I.scrollHeight&&(w(),mxEvent.consume(a))});var a=null,b;for(b in V){var f=document.createElement("div"),m=mxResources.get(b),h=V[b];null==m&&(m=b.substring(0,1).toUpperCase()+b.substring(1));18<m.length&&(m=m.substring(0,18)+"&hellip;");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";f.setAttribute("title",m+" ("+
-h.length+")");mxUtils.write(f,f.getAttribute("title"));null!=c&&(f.style.padding=c);J.appendChild(f);null==a&&(a=f,a.style.backgroundColor=n);(function(c,b){mxEvent.addListener(f,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=n,I.scrollTop=0,I.innerHTML="",H=0,N=V[c],B=null,w())})})(b,f)}w()}e=null!=e?e:!0;g=null!=g?g:!1;n=null!=n?n:"#ebf2f9";l=null!=l?l:"#e6eff8";p=null!=p?p:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var z=document.createElement("div");
-z.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";e&&z.appendChild(D);var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="40px";A.style.height="40px";A.style.marginRight="10px";A.style.paddingBottom="4px";A.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":
-a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&e&&D.appendChild(A);e&&mxUtils.write(D,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");A=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?A=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?A=a.dropbox.extension:
-a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?A=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?A=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(A=a.trello.extension);var G=document.createElement("input");G.setAttribute("value",a.defaultFilename+A);G.style.marginRight="20px";G.style.marginLeft="10px";G.style.width=d?"220px":"430px";this.init=function(){e&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",
-!1,null))};e&&D.appendChild(G);var D=!1,H=0,E=mxUtils.button(mxResources.get("create"),function(){x()});E.className="geBtn gePrimaryBtn";if(h||q){var C=[],B=null,L=function(a){E.setAttribute("disabled","disabled");for(var c=0;c<C.length;c++)C[c].className=c==a?"geBtn gePrimaryBtn":"geBtn"},D=!0,A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";z.appendChild(A);var F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){J.style.display="";I.style.left=
+h.length+")");mxUtils.write(f,f.getAttribute("title"));null!=c&&(f.style.padding=c);J.appendChild(f);null==a&&(a=f,a.style.backgroundColor=n);(function(c,b){mxEvent.addListener(f,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=n,I.scrollTop=0,I.innerHTML="",H=0,N=V[c],B=null,w())})})(b,f)}w()}d=null!=d?d:!0;g=null!=g?g:!1;n=null!=n?n:"#ebf2f9";l=null!=l?l:"#e6eff8";p=null!=p?p:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var z=document.createElement("div");
+z.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";d&&z.appendChild(D);var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="40px";A.style.height="40px";A.style.marginRight="10px";A.style.paddingBottom="4px";A.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":
+a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&d&&D.appendChild(A);d&&mxUtils.write(D,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");A=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?A=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?A=a.dropbox.extension:
+a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?A=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?A=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(A=a.trello.extension);var G=document.createElement("input");G.setAttribute("value",a.defaultFilename+A);G.style.marginRight="20px";G.style.marginLeft="10px";G.style.width=e?"220px":"430px";this.init=function(){d&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",
+!1,null))};d&&D.appendChild(G);var D=!1,H=0,E=mxUtils.button(mxResources.get("create"),function(){x()});E.className="geBtn gePrimaryBtn";if(h||q){var C=[],B=null,L=function(a){E.setAttribute("disabled","disabled");for(var c=0;c<C.length;c++)C[c].className=c==a?"geBtn gePrimaryBtn":"geBtn"},D=!0,A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";z.appendChild(A);var F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){J.style.display="";I.style.left=
"160px";L(0);I.scrollTop=0;I.innerHTML="";H=0;B!=N&&(N=B,w(),B=null)});C.push(F);A.appendChild(F);var K=function(a){J.style.display="none";I.style.left="30px";L(a?-1:1);null==B&&(B=N);I.scrollTop=0;I.innerHTML="";var c=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});c.spin(I);H=0;var b=function(a,b){c.stop();N=a;b?I.innerHTML=b:0==a.length?I.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(I.innerHTML=
"",w())};a?q(O.value,b):h(b)};h&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){K()}),A.appendChild(F),C.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerHTML=mxResources.get("search")+":";A.appendChild(F);var O=document.createElement("input");O.style.marginRight="10px";O.style.marginLeft="10px";O.style.width="220px";mxEvent.addListener(O,"keypress",function(a){13==a.keyCode&&K(!0)});A.appendChild(O);F=mxUtils.button(mxResources.get("search"),
-function(){K(!0)});F.className="geBtn";A.appendChild(F)}L(0)}var S=null,T=null,P=null,M=null,R=null,I=document.createElement("div");I.style.border="1px solid #d3d3d3";I.style.position="absolute";I.style.left="160px";I.style.right="34px";D=(e?72:40)+(D?30:0);I.style.top=D+"px";I.style.bottom="68px";I.style.margin="6px 0 0 -1px";I.style.padding="6px";I.style.overflow="auto";var J=document.createElement("div");J.style.cssText="position:absolute;left:30px;width:128px;top:"+D+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
-var Y=140,U=140,V={},X=1;V.basic=[{title:"blankDiagram",select:!0}];var N=V.basic;if(!d){z.appendChild(J);z.appendChild(I);var Q=!1;mxUtils.get(f,function(a){if(!Q){Q=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var b=c.indexOf("/"),c=c.substring(0,b),b=V[c];null==b&&(X++,b=[],V[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=
-a.nextSibling}v()}})}mxEvent.addListener(G,"keypress",function(a){13==a.keyCode&&x()});f=document.createElement("div");f.style.marginTop=d?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";D=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});D.className="geBtn";!a.editor.cancelFirst||g&&null==k||f.appendChild(D);d||a.isOffline()||!e||null!=b||g||(A=mxUtils.button(mxResources.get("help"),
-function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),A.className="geBtn",f.appendChild(A));d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(G.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?window.location.href=c:window.openWindow(c))},
-mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),d.className="geBtn",f.appendChild(d));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(b){a.openFiles(c.files,!0)});c.click()}),u.className="geBtn",f.appendChild(u));f.appendChild(E);a.editor.cancelFirst||null!=b||g&&null==k||f.appendChild(D);z.appendChild(f);
-this.container=z},CreateDialog=function(a,d,e,b,g,k,n,l,p,c,f,h,q,t,u){function w(c,b,f,m){function t(){mxEvent.addListener(e,"click",function(){var c=f;if(n){var b=v.value,m=b.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>m){var c=null!=c?c:A.value,h="";c==App.MODE_GOOGLE?h=a.drive.extension:c==App.MODE_GITHUB?h=a.gitHub.extension:c==App.MODE_TRELLO?h=a.trello.extension:c==App.MODE_DROPBOX?h=a.dropbox.extension:c==App.MODE_ONEDRIVE?h=a.oneDrive.extension:c==App.MODE_DEVICE&&(h=".xml");0<=m&&(b=b.substring(0,
-m));v.value=b+h}}x(f)})}var e=document.createElement("a");e.style.overflow="hidden";var q=document.createElement("img");q.src=c;q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(q);mxClient.IS_QUIRKS&&(e.style.cssFloat=
-"left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var g=document.createElement("div");e.appendChild(g);mxUtils.write(g,b);if(null!=m&&null==a[m]){q.style.visibility="hidden";mxUtils.setOpacity(g,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(e);var y=window.setTimeout(function(){null==a[m]&&(u.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,
-function(){null!=a[m]&&(window.clearTimeout(y),mxUtils.setOpacity(g,100),q.style.visibility="",u.stop(),t())}))}else t();z.appendChild(e);++D==h&&(mxUtils.br(z),D=0)}function x(c){var b=v.value;if(null==c||null!=b&&0<b.length)a.hideDialog(),e(b,c)}n=null!=n?n:!0;l=null!=l?l:!0;h=null!=h?h:4;var y=document.createElement("div");null==b&&a.addLanguageMenu(y);var m=document.createElement("h2");mxUtils.write(m,g||mxResources.get("create"));m.style.marginTop="0px";m.style.marginBottom="24px";y.appendChild(m);
-mxUtils.write(y,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",d);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};y.appendChild(v);null!=q&&null!=t&&"image/"==t.substring(0,6)&&(v.style.width="160px",g=null,"image/svg+xml"==t&&mxClient.IS_SVG?(g=document.createElement("div"),
+function(){K(!0)});F.className="geBtn";A.appendChild(F)}L(0)}var S=null,T=null,P=null,M=null,R=null,I=document.createElement("div");I.style.border="1px solid #d3d3d3";I.style.position="absolute";I.style.left="160px";I.style.right="34px";D=(d?72:40)+(D?30:0);I.style.top=D+"px";I.style.bottom="68px";I.style.margin="6px 0 0 -1px";I.style.padding="6px";I.style.overflow="auto";var J=document.createElement("div");J.style.cssText="position:absolute;left:30px;width:128px;top:"+D+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";
+var Y=140,U=140,V={},X=1;V.basic=[{title:"blankDiagram",select:!0}];var N=V.basic;if(!e){z.appendChild(J);z.appendChild(I);var Q=!1;mxUtils.get(f,function(a){if(!Q){Q=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var b=c.indexOf("/"),c=c.substring(0,b),b=V[c];null==b&&(X++,b=[],V[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=
+a.nextSibling}v()}})}mxEvent.addListener(G,"keypress",function(a){13==a.keyCode&&x()});f=document.createElement("div");f.style.marginTop=e?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";D=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});D.className="geBtn";!a.editor.cancelFirst||g&&null==k||f.appendChild(D);e||a.isOffline()||!d||null!=b||g||(A=mxUtils.button(mxResources.get("help"),
+function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),A.className="geBtn",f.appendChild(A));e||"1"==urlParams.embed||g||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(G.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?window.location.href=c:window.openWindow(c))},
+mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",f.appendChild(e));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(b){a.openFiles(c.files,!0)});c.click()}),u.className="geBtn",f.appendChild(u));f.appendChild(E);a.editor.cancelFirst||null!=b||g&&null==k||f.appendChild(D);z.appendChild(f);
+this.container=z},CreateDialog=function(a,e,d,b,g,k,n,l,p,c,f,h,q,t,u){function w(c,b,f,m){function t(){mxEvent.addListener(d,"click",function(){var c=f;if(n){var b=v.value,m=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>m){var c=null!=c?c:A.value,h="";c==App.MODE_GOOGLE?h=a.drive.extension:c==App.MODE_GITHUB?h=a.gitHub.extension:c==App.MODE_TRELLO?h=a.trello.extension:c==App.MODE_DROPBOX?h=a.dropbox.extension:c==App.MODE_ONEDRIVE?h=a.oneDrive.extension:c==App.MODE_DEVICE&&(h=".xml");0<=m&&(b=b.substring(0,
+m));v.value=b+h}}x(f)})}var d=document.createElement("a");d.style.overflow="hidden";var q=document.createElement("img");q.src=c;q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.className="geBaseButton";d.style.position="relative";d.style.margin="4px";d.style.padding="8px 8px 10px 8px";d.style.whiteSpace="nowrap";d.appendChild(q);mxClient.IS_QUIRKS&&(d.style.cssFloat=
+"left",d.style.zoom="1");d.style.color="gray";d.style.fontSize="11px";var g=document.createElement("div");d.appendChild(g);mxUtils.write(g,b);if(null!=m&&null==a[m]){q.style.visibility="hidden";mxUtils.setOpacity(g,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(d);var y=window.setTimeout(function(){null==a[m]&&(u.stop(),d.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,
+function(){null!=a[m]&&(window.clearTimeout(y),mxUtils.setOpacity(g,100),q.style.visibility="",u.stop(),t())}))}else t();z.appendChild(d);++D==h&&(mxUtils.br(z),D=0)}function x(c){var b=v.value;if(null==c||null!=b&&0<b.length)a.hideDialog(),d(b,c)}n=null!=n?n:!0;l=null!=l?l:!0;h=null!=h?h:4;var y=document.createElement("div");null==b&&a.addLanguageMenu(y);var m=document.createElement("h2");mxUtils.write(m,g||mxResources.get("create"));m.style.marginTop="0px";m.style.marginBottom="24px";y.appendChild(m);
+mxUtils.write(y,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",e);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};y.appendChild(v);null!=q&&null!=t&&"image/"==t.substring(0,6)&&(v.style.width="160px",g=null,"image/svg+xml"==t&&mxClient.IS_SVG?(g=document.createElement("div"),
g.innerHTML=mxUtils.trim(q),q=g.getElementsByTagName("svg")[0],t=parseInt(q.getAttribute("width")),u=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+t+" "+u),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(g=document.createElement("img"),g.setAttribute("src","data:"+t+(u?";base64,":";utf8,")+q)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),
y.appendChild(g),p&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){x("_blank")})));mxUtils.br(y);var z=document.createElement("div");z.style.textAlign="center";var D=0;z.style.marginTop="6px";y.appendChild(z);var A=document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(g,mxResources.get("googleDrive")),A.appendChild(g),
w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),A.appendChild(g),a.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(g=document.createElement("option"),
@@ -6572,139 +6572,139 @@ g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbo
(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),A.appendChild(g),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),A.appendChild(g),a.mode!=App.MODE_DEVICE&&l||g.setAttribute("selected",
"selected"),f&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),A.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right";
null!=c&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(c)}),g.className="geBtn",l.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&l.appendChild(g);null==b&&(q=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),q.className="geBtn",l.appendChild(q));p&&(p=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),
-p.className="geBtn",l.appendChild(p));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){x(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",l.appendChild(k));a.editor.cancelFirst||l.appendChild(g);mxEvent.addListener(v,"keypress",function(c){13==c.keyCode?x(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(l);this.container=y},PopupDialog=function(a,d,e,b,g){g=null!=g?g:!0;var k=document.createElement("div");
-k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});n.className="geBtn";n.style.marginBottom="8px";n.style.width="280px";k.appendChild(n);mxUtils.br(k);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=e&&e();a.openLink(d)});l.className="geBtn gePrimaryBtn";l.style.width=n.style.width;k.appendChild(l);mxUtils.br(k);
-mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,d,e,b,g,k){k=null!=k?k:!0;var n=a.editor.graph,l=document.createElement("div");mxUtils.write(l,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";mxClient.IS_VML||(d.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("value",
-e);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";e=document.createElement("div");e.setAttribute("title",
-mxResources.get("reset"));e.style.position="relative";e.style.left="-16px";e.style.width="12px";e.style.height="14px";e.style.cursor="pointer";e.style.display=mxClient.IS_VML?"inline":"inline-block";e.style.top=(mxClient.IS_VML?0:3)+"px";e.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(e,"click",function(){p.value="";p.focus()});d.appendChild(p);d.appendChild(e);l.appendChild(d);var c=function(c,f,h,e){var t="data:"==c.substring(0,5);!a.isOffline()||t&&"undefined"===typeof chrome?
-0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(m){a.spinner.stop();a.hideDialog();var t=!1===e?1:null!=f&&null!=h?Math.max(f/m.width,h/m.height):Math.min(1,Math.min(520/m.width,520/m.height));k&&(c=a.convertDataUri(c));b(c,Math.round(Number(m.width)*t),Math.round(Number(m.height)*t))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),
-f=null==f?120:f,h=null==h?100:h,a.hideDialog(),b(c,f,h))},f=function(f,h){if(null!=f){var e=g?null:n.getModel().getGeometry(n.getSelectionCell());null!=e?c(f,e.width,e.height,h):c(f,null,null,h)}else a.hideDialog(),b(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=l.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,
-"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,function(a,c,b,h,e,d,t,q){f(a,q)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));
-else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var h=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(h)&&f(decodeURIComponent(h))}c.stopPropagation();c.preventDefault()}),!1)}};e=document.createElement("div");e.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";e.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&e.appendChild(d);ImageDialog.filePicked=
-function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(p.value=a.url));p.focus()};if(Graph.fileSupport){var h=document.createElement("input");h.setAttribute("multiple","multiple");h.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(h,"change",function(c){a.importFiles(h.files,0,0,a.maxImageSize,function(a,c,b,h,m,e){f(a)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){h.click()});q.className="geBtn";e.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==p.value.substring(0,11)&&"data:image/svg"!=p.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a,p.value,function(a){p.value=a});a.showDialog(c.container,200,180,!0,!0);c.init()}),q.className="geBtn",e.appendChild(q));"undefined"!=
-typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),q.className="geBtn",e.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&
+p.className="geBtn",l.appendChild(p));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){x(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",l.appendChild(k));a.editor.cancelFirst||l.appendChild(g);mxEvent.addListener(v,"keypress",function(c){13==c.keyCode?x(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(l);this.container=y},PopupDialog=function(a,e,d,b,g){g=null!=g?g:!0;var k=document.createElement("div");
+k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});n.className="geBtn";n.style.marginBottom="8px";n.style.width="280px";k.appendChild(n);mxUtils.br(k);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=d&&d();a.openLink(e)});l.className="geBtn gePrimaryBtn";l.style.width=n.style.width;k.appendChild(l);mxUtils.br(k);
+mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,e,d,b,g,k){k=null!=k?k:!0;var n=a.editor.graph,l=document.createElement("div");mxUtils.write(l,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("value",
+d);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",
+mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){p.value="";p.focus()});e.appendChild(p);e.appendChild(d);l.appendChild(e);var c=function(c,f,h,d){var t="data:"==c.substring(0,5);!a.isOffline()||t&&"undefined"===typeof chrome?
+0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(m){a.spinner.stop();a.hideDialog();var t=!1===d?1:null!=f&&null!=h?Math.max(f/m.width,h/m.height):Math.min(1,Math.min(520/m.width,520/m.height));k&&(c=a.convertDataUri(c));b(c,Math.round(Number(m.width)*t),Math.round(Number(m.height)*t))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),
+f=null==f?120:f,h=null==h?100:h,a.hideDialog(),b(c,f,h))},f=function(f,h){if(null!=f){var d=g?null:n.getModel().getGeometry(n.getSelectionCell());null!=d?c(f,d.width,d.height,h):c(f,null,null,h)}else a.hideDialog(),b(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=l.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,
+"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,function(a,c,b,h,d,e,t,q){f(a,q)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));
+else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var h=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(h)&&f(decodeURIComponent(h))}c.stopPropagation();c.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);ImageDialog.filePicked=
+function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(p.value=a.url));p.focus()};if(Graph.fileSupport){var h=document.createElement("input");h.setAttribute("multiple","multiple");h.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(h,"change",function(c){a.importFiles(h.files,0,0,a.maxImageSize,function(a,c,b,h,m,d){f(a)},function(){},function(a){return"image/"==a.type.substring(0,
+6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){h.click()});q.className="geBtn";d.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==p.value.substring(0,11)&&"data:image/svg"!=p.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a,p.value,function(a){p.value=a});a.showDialog(c.container,200,180,!0,!0);c.init()}),q.className="geBtn",d.appendChild(q));"undefined"!=
+typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),q.className="geBtn",d.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&
(q=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),
-q.className="geBtn",e.appendChild(q)));mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&f(p.value)});q=mxUtils.button(mxResources.get("apply"),function(){f(p.value)});q.className="geBtn gePrimaryBtn";e.appendChild(q);a.editor.cancelFirst||e.appendChild(d);Graph.fileSupport&&(e.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.style.backgroundRepeat="no-repeat",d=document.createElement("div"),d.style.position=
-"absolute",d.style.width="420px",d.style.top="58%",d.style.textAlign="center",d.style.fontSize="18px",d.style.color="#a0c3ff",mxUtils.write(d,mxResources.get("dragImagesHere")),l.appendChild(d));l.appendChild(e);this.container=l},LinkDialog=function(a,d,e,b,g){function k(a,c,b){b=mxUtils.button("",b);b.className="geBtn";b.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";c.style.width="26px";c.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";
+q.className="geBtn",d.appendChild(q)));mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&f(p.value)});q=mxUtils.button(mxResources.get("apply"),function(){f(p.value)});q.className="geBtn gePrimaryBtn";d.appendChild(q);a.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position=
+"absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),l.appendChild(e));l.appendChild(d);this.container=l},LinkDialog=function(a,e,d,b,g){function k(a,c,b){b=mxUtils.button("",b);b.className="geBtn";b.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";c.style.width="26px";c.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";
b.appendChild(c);x.appendChild(b)}var n=document.createElement("div");mxUtils.write(n,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("dragUrlsHere"));p.setAttribute("type","text");
p.style.marginTop="6px";p.style.width="400px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){p.value="";p.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name",
-"current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(g&&null!=a.pages){null!=d&&a.editor.graph.isPageLink(d)?(h.setAttribute("checked","checked"),h.defaultChecked=!0):(p.setAttribute("value",d),f.setAttribute("checked","checked"),f.defaultChecked=!0);p.style.width="380px";l.appendChild(f);l.appendChild(p);l.appendChild(c);mxUtils.br(l);l.appendChild(h);g=!1;for(c=0;c<a.pages.length;c++){var t=document.createElement("option");mxUtils.write(t,a.pages[c].getName()||mxResources.get("pageWithNumber",
-[c+1]));t.setAttribute("value","data:page/id,"+a.pages[c].getId());d==t.getAttribute("value")&&(t.setAttribute("selected","selected"),g=!0);q.appendChild(t)}if(!g&&h.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");q.appendChild(u);mxEvent.addListener(q,"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}l.appendChild(q)}else p.setAttribute("value",
-d),l.appendChild(p),l.appendChild(c);n.appendChild(l);var w=mxUtils.button(e,function(){a.hideDialog();b(h.checked?"pageNotFound"!==q.value?q.value:d:p.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){h.checked?q.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){f.removeAttribute("checked");
+"current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(g&&null!=a.pages){null!=e&&a.editor.graph.isPageLink(e)?(h.setAttribute("checked","checked"),h.defaultChecked=!0):(p.setAttribute("value",e),f.setAttribute("checked","checked"),f.defaultChecked=!0);p.style.width="380px";l.appendChild(f);l.appendChild(p);l.appendChild(c);mxUtils.br(l);l.appendChild(h);g=!1;for(c=0;c<a.pages.length;c++){var t=document.createElement("option");mxUtils.write(t,a.pages[c].getName()||mxResources.get("pageWithNumber",
+[c+1]));t.setAttribute("value","data:page/id,"+a.pages[c].getId());e==t.getAttribute("value")&&(t.setAttribute("selected","selected"),g=!0);q.appendChild(t)}if(!g&&h.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");q.appendChild(u);mxEvent.addListener(q,"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}l.appendChild(q)}else p.setAttribute("value",
+e),l.appendChild(p),l.appendChild(c);n.appendChild(l);var w=mxUtils.button(d,function(){a.hideDialog();b(h.checked?"pageNotFound"!==q.value?q.value:e:p.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){h.checked?q.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){f.removeAttribute("checked");
h.setAttribute("checked","checked");h.checked=!0});mxEvent.addListener(p,"focus",function(){h.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var c=n.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));f.stopPropagation();
-f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-e.style.verticalAlign="middle";e.className="geBtn";a.editor.cancelFirst&&x.appendChild(e);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c="https://"+c+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?
+f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&x.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c="https://"+c+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?
(c=DriveClient.prototype.newAppHostname,c="https://"+c+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+a.docs[0].id);p.value=c;p.focus()}else LinkDialog.selectedDocs=null;p.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,
function(){a.spinner.stop();if(null==a.linkPicker){var c=gapi.auth.getToken().access_token,b=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),h=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(b).addView(f).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
"1"==urlParams.photos&&c.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=c.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){p.value=a[0].link;p.focus()}})});null!=
a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,c){p.value=c.value[0].webUrl;p.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var c=a[0],b=a[1],f=a[2];a=a.slice(3,a.length).join("/");p.value="https://github.com/"+c+"/"+b+"/blob/"+f+"/"+a;p.focus()}})});mxEvent.addListener(p,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
-b(h.checked?q.value:p.value,LinkDialog.selectedDocs))});x.appendChild(w);a.editor.cancelFirst||x.appendChild(e);n.appendChild(x);this.container=n},AboutDialog=function(a){var d=document.createElement("div");d.style.marginTop="6px";d.setAttribute("align","center");var e=document.createElement("img");e.style.border="0px";mxClient.IS_SVG?(e.setAttribute("width","164"),e.setAttribute("height","221"),e.style.width="164px",e.style.height="221px",e.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):
-(e.setAttribute("width","176"),e.setAttribute("height","219"),e.style.width="170px",e.style.height="219px",e.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));d.appendChild(e);mxUtils.br(d);e=document.createElement("small");e.innerHTML="v "+EditorUi.VERSION;e.style.color="#505050";d.appendChild(e);mxUtils.br(d);mxUtils.br(d);e=document.createElement("small");e.style.color="#505050";e.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';
-d.appendChild(e);mxEvent.addListener(d,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=d},FeedbackDialog=function(a){var d=document.createElement("div"),e=document.createElement("div");mxUtils.write(e,mxResources.get("sendYourFeedbackToDrawIo"));e.style.fontSize="18px";e.style.marginBottom="18px";d.appendChild(e);e=document.createElement("div");mxUtils.write(e,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");d.appendChild(e);var b=document.createElement("input");
+b(h.checked?q.value:p.value,LinkDialog.selectedDocs))});x.appendChild(w);a.editor.cancelFirst||x.appendChild(d);n.appendChild(x);this.container=n},AboutDialog=function(a){var e=document.createElement("div");e.style.marginTop="6px";e.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):
+(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+"/logo-flat.png"));e.appendChild(d);mxUtils.br(e);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";e.appendChild(d);mxUtils.br(e);mxUtils.br(e);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';
+e.appendChild(d);mxEvent.addListener(e,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=e},FeedbackDialog=function(a){var e=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");e.appendChild(d);var b=document.createElement("input");
b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),function(){var c=(n.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;c.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(b.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+p.value+c),function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
-mxEvent.addListener(b,"change",function(){0<b.value.length&&0<k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});d.appendChild(b);this.init=function(){b.focus()};var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;e=document.createElement("p");e.style.marginTop=
-"14px";e.appendChild(n);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));e.appendChild(l);mxEvent.addListener(l,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});d.appendChild(e);e=document.createElement("div");mxUtils.write(e,mxResources.get("feedback"));d.appendChild(e);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("commentsNotes"));
-d.appendChild(p);e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(e.appendChild(l),e.appendChild(g)):(e.appendChild(g),e.appendChild(l));d.appendChild(e);this.container=d};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,d,e){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.left="199px";n.style.width="470px";n.style.height=
+mxEvent.addListener(b,"change",function(){0<b.value.length&&0<k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});e.appendChild(b);this.init=function(){b.focus()};var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;d=document.createElement("p");d.style.marginTop=
+"14px";d.appendChild(n);var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(l);mxEvent.addListener(l,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));e.appendChild(d);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("commentsNotes"));
+e.appendChild(p);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(d.appendChild(l),d.appendChild(g)):(d.appendChild(g),d.appendChild(l));e.appendChild(d);this.container=e};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,e,d){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.left="199px";n.style.width="470px";n.style.height=
"376px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);b.appendChild(n);var l=new Graph(n);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var p=0,c=null,f=0,h=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=c&&null!=c[f]?c[f].getAttribute("name"):"pagenumber"==a?f+1:h.apply(this,arguments)};l.getLinkForCell=function(){return null};Editor.MathJaxRender&&
l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,b){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=a.getCurrentFile(),u=null,w=null,x=null,y=null,m=mxUtils.button("",function(){null!=x&&l.zoomIn()});m.className="geSprite geSprite-zoomin";m.setAttribute("title",mxResources.get("zoomIn"));
m.style.outline="none";m.style.border="none";m.style.margin="2px";m.setAttribute("disabled","disabled");mxUtils.setOpacity(m,20);var v=mxUtils.button("",function(){null!=x&&l.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var z=mxUtils.button("",function(){null!=x&&(l.maxFitScale=8,l.fit(8),l.center())});z.className=
"geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var D=mxUtils.button("",function(){null!=x&&(l.zoomActual(),l.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var A=
document.createElement("div");A.style.position="absolute";A.style.textAlign="right";A.style.color="gray";A.style.marginTop="10px";A.style.backgroundColor="transparent";A.style.top="440px";A.style.right="32px";A.style.maxWidth="380px";A.style.cursor="default";var G=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var c=a.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():a.defaultFilename,b=mxUtils.getXml(x.documentElement);a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):
-(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(a.editor.graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=e?e(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(c){a.spinner.stop();
+(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(a.editor.graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(c){a.spinner.stop();
a.replaceFileData(y);a.hideDialog()},function(c){a.spinner.stop();a.editor.setStatus("");a.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)})})});H.className="geBtn";H.setAttribute("disabled","disabled");var E=document.createElement("select");E.setAttribute("disabled","disabled");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";var C=null;mxEvent.addListener(E,"change",function(a){null!=
-C&&(C(a),mxEvent.consume(a))});var B=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),window.openWindow(a.getUrl()))});B.className="geBtn";B.setAttribute("disabled","disabled");null!=e&&(B.style.display="none");var L=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
-"disabled");null!=e&&(L.style.display="none",H.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var F=document.createElement("div");F.className="geToolbarContainer";F.style.backgroundColor="transparent";F.style.padding="2px";F.style.border="none";F.style.left="199px";F.style.top="442px";var K=null;if(null!=d&&0<d.length){n.style.cursor="move";var O=document.createElement("table");O.style.border=
-"1px solid lightGray";O.style.borderCollapse="collapse";O.style.borderSpacing="0px";O.style.width="100%";var S=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var P=d.length-1;0<=P;P--){var M=function(b){var h=new Date(b.modifiedDate),e=null;if(0<=h.getTime()){var g=function(b){q.stop();var d=mxUtils.parseXml(b),g=a.editor.extractGraphModel(d.documentElement,!0);if(null!=g){var u=function(c){null!=c&&(c=
-k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";n.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};E.style.display="none";E.innerHTML="";x=d;y=b;c=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){d=g.getElementsByTagName("diagram");c=[];for(b=0;b<d.length;b++)c.push(d[b]);
-f=Math.min(p,c.length-1);0<c.length&&u(c[f]);if(1<c.length)for(E.removeAttribute("disabled"),E.style.display="",b=0;b<c.length;b++)d=document.createElement("option"),mxUtils.write(d,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),d.setAttribute("value",b),b==f&&d.setAttribute("selected","selected"),E.appendChild(d);C=function(){f=p=parseInt(E.value);u(c[p])}}else k(g);A.innerHTML="";mxUtils.write(A,h.toLocaleDateString()+" "+h.toLocaleTimeString());A.setAttribute("title",e.getAttribute("title"));
+C&&(C(a),mxEvent.consume(a))});var B=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),window.openWindow(a.getUrl()))});B.className="geBtn";B.setAttribute("disabled","disabled");null!=d&&(B.style.display="none");var L=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
+"disabled");null!=d&&(L.style.display="none",H.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var F=document.createElement("div");F.className="geToolbarContainer";F.style.backgroundColor="transparent";F.style.padding="2px";F.style.border="none";F.style.left="199px";F.style.top="442px";var K=null;if(null!=e&&0<e.length){n.style.cursor="move";var O=document.createElement("table");O.style.border=
+"1px solid lightGray";O.style.borderCollapse="collapse";O.style.borderSpacing="0px";O.style.width="100%";var S=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var P=e.length-1;0<=P;P--){var M=function(b){var h=new Date(b.modifiedDate),d=null;if(0<=h.getTime()){var g=function(b){q.stop();var e=mxUtils.parseXml(b),g=a.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var u=function(c){null!=c&&(c=
+k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";n.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};E.style.display="none";E.innerHTML="";x=e;y=b;c=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");c=[];for(b=0;b<e.length;b++)c.push(e[b]);
+f=Math.min(p,c.length-1);0<c.length&&u(c[f]);if(1<c.length)for(E.removeAttribute("disabled"),E.style.display="",b=0;b<c.length;b++)e=document.createElement("option"),mxUtils.write(e,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),e.setAttribute("value",b),b==f&&e.setAttribute("selected","selected"),E.appendChild(e);C=function(){f=p=parseInt(E.value);u(c[p])}}else k(g);A.innerHTML="";mxUtils.write(A,h.toLocaleDateString()+" "+h.toLocaleTimeString());A.setAttribute("title",d.getAttribute("title"));
m.removeAttribute("disabled");v.removeAttribute("disabled");z.removeAttribute("disabled");D.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),G.removeAttribute("disabled"),L.removeAttribute("disabled"),B.removeAttribute("disabled"));mxUtils.setOpacity(m,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(D,60)}else E.style.display="none",E.innerHTML="",A.innerHTML="",mxUtils.write(A,mxResources.get("errorLoadingFile"))},
-e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(k,mxResources.get("current")):h.toDateString()===T?mxUtils.write(k,h.toLocaleTimeString()):mxUtils.write(k,h.toLocaleDateString()+" "+h.toLocaleTimeString());e.appendChild(k);e.setAttribute("title",h.toLocaleDateString()+" "+h.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+
-(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){w!=b&&(q.stop(),null!=u&&(u.style.backgroundColor=""),w=b,u=e,u.style.backgroundColor="#ebf2f9",y=x=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",n.style.backgroundColor="#ffffff",l.getModel().clear(),H.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),D.setAttribute("disabled",
-"disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(m,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(D,20),q.spin(n),b.getXml(function(a){w==b&&g(a)},function(a){q.stop();E.style.display="none";E.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){L.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(e)}return e}(d[P]);null!=M&&P==d.length-1&&(K=M)}O.appendChild(S);k.appendChild(O)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(n.style.display="none",F.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(n.style.display="none",F.style.display="none",mxUtils.write(k,
+d=document.createElement("tr");d.style.borderBottom="1px solid lightGray";d.style.fontSize="12px";d.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):h.toDateString()===T?mxUtils.write(k,h.toLocaleTimeString()):mxUtils.write(k,h.toLocaleDateString()+" "+h.toLocaleTimeString());d.appendChild(k);d.setAttribute("title",h.toLocaleDateString()+" "+h.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+
+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(a){w!=b&&(q.stop(),null!=u&&(u.style.backgroundColor=""),w=b,u=d,u.style.backgroundColor="#ebf2f9",y=x=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",n.style.backgroundColor="#ffffff",l.getModel().clear(),H.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),D.setAttribute("disabled",
+"disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(m,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(D,20),q.spin(n),b.getXml(function(a){w==b&&g(a)},function(a){q.stop();E.style.display="none";E.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(d,"dblclick",function(a){L.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(d)}return d}(e[P]);null!=M&&P==e.length-1&&(K=M)}O.appendChild(S);k.appendChild(O)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(n.style.display="none",F.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(n.style.display="none",F.style.display="none",mxUtils.write(k,
mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";F.appendChild(E);F.appendChild(m);F.appendChild(v);F.appendChild(D);F.appendChild(z);a.editor.cancelFirst?(g.appendChild(k),g.appendChild(G),g.appendChild(B),g.appendChild(H),g.appendChild(L)):(g.appendChild(G),g.appendChild(B),g.appendChild(H),g.appendChild(L),g.appendChild(k));b.appendChild(g);b.appendChild(F);b.appendChild(A);this.container=
-b},DraftDialog=function(a,d,e,b,g,k,n,l){var p=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,d);p.appendChild(c);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);p.appendChild(f);var h=new Graph(f);
-h.setEnabled(!1);h.setPanning(!0);h.panningHandler.ignoreCell=!0;h.panningHandler.useLeftButtonForPanning=!0;h.minFitScale=null;h.maxFitScale=null;h.centerZoom=!0;d=mxUtils.parseXml(e);var q=a.editor.extractGraphModel(d.documentElement,!0),t=0,u=null,w=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):"pagenumber"==a?t+1:w.apply(this,arguments)};h.getLinkForCell=function(){return null};d=mxUtils.button("",function(){h.zoomIn()});d.className=
-"geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);e=mxUtils.button("",function(){h.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);c=mxUtils.button("",function(){h.maxFitScale=8;h.fit(8);h.center()});c.className="geSprite geSprite-fit";c.setAttribute("title",
+b},DraftDialog=function(a,e,d,b,g,k,n,l){var p=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,e);p.appendChild(c);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);p.appendChild(f);var h=new Graph(f);
+h.setEnabled(!1);h.setPanning(!0);h.panningHandler.ignoreCell=!0;h.panningHandler.useLeftButtonForPanning=!0;h.minFitScale=null;h.maxFitScale=null;h.centerZoom=!0;e=mxUtils.parseXml(d);var q=a.editor.extractGraphModel(e.documentElement,!0),t=0,u=null,w=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):"pagenumber"==a?t+1:w.apply(this,arguments)};h.getLinkForCell=function(){return null};e=mxUtils.button("",function(){h.zoomIn()});e.className=
+"geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){h.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);c=mxUtils.button("",function(){h.maxFitScale=8;h.fit(8);h.center()});c.className="geSprite geSprite-fit";c.setAttribute("title",
mxResources.get("fit"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);var x=mxUtils.button("",function(){h.zoomActual();h.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);g=mxUtils.button(n||mxResources.get("discard"),g);g.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position=
"relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight="6px";y.style.display="none";b=mxUtils.button(k||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";f.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,h.getModel());h.maxFitScale=1;h.fit(8);h.center()}}function b(b){null!=b&&(b=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(y,"change",function(a){t=parseInt(y.value);b(u[t]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var e=q.getElementsByTagName("diagram");
-u=[];for(var d=0;d<e.length;d++)u.push(e[d]);0<u.length&&b(u[t]);if(1<u.length)for(y.style.display="",d=0;d<u.length;d++)e=document.createElement("option"),mxUtils.write(e,u[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),e.setAttribute("value",d),d==t&&e.setAttribute("selected","selected"),y.appendChild(e)}else c(q)};n.appendChild(y);n.appendChild(d);n.appendChild(e);n.appendChild(x);n.appendChild(c);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.className=
-"geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(k.appendChild(d),null!=l&&k.appendChild(l),k.appendChild(g),k.appendChild(b)):(k.appendChild(b),k.appendChild(g),null!=l&&k.appendChild(l),k.appendChild(d));p.appendChild(k);p.appendChild(n);this.container=p},FindWindow=function(a,d,e,b,g){function k(a,c,b){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var f=0;f<c.length;f++)if("label"!=c[f].nodeName){var h=
-mxUtils.trim(c[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&h.substring(0,b.length)===b||null!=a&&a.test(h))return!0}}return!1}function n(){var a=p.model.getDescendants(p.model.getRoot()),b=q.value.toLowerCase(),h=t.checked?new RegExp(b):null,e=null;c!=b&&(c=b,f=null);var d=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var n=p.view.getState(a[g]);if(null!=n&&null!=n.cell.value&&(d||null==e)&&(p.model.isVertex(n.cell)||p.model.isEdge(n.cell))&&(p.isHtmlLabel(n.cell)?
-(u.innerHTML=p.getLabel(n.cell),label=mxUtils.extractTextWithWhitespace([u])):label=p.getLabel(n.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==h&&(label.substring(0,b.length)===b||k(h,n.cell,b))||null!=h&&(h.test(label)||k(h,n.cell,b))))if(d){e=n;break}else null==e&&(e=n);d=d||n==f}null!=e?(f=e,p.scrollCellToVisible(f.cell),p.isEnabled()?p.setSelectionCell(f.cell):p.highlightCell(f.cell)):p.isEnabled()&&p.clearSelection();return 0==b.length||null!=e}
+this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";f.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,h.getModel());h.maxFitScale=1;h.fit(8);h.center()}}function b(b){null!=b&&(b=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(y,"change",function(a){t=parseInt(y.value);b(u[t]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var d=q.getElementsByTagName("diagram");
+u=[];for(var e=0;e<d.length;e++)u.push(d[e]);0<u.length&&b(u[t]);if(1<u.length)for(y.style.display="",e=0;e<u.length;e++)d=document.createElement("option"),mxUtils.write(d,u[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==t&&d.setAttribute("selected","selected"),y.appendChild(d)}else c(q)};n.appendChild(y);n.appendChild(e);n.appendChild(d);n.appendChild(x);n.appendChild(c);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.className=
+"geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(k.appendChild(e),null!=l&&k.appendChild(l),k.appendChild(g),k.appendChild(b)):(k.appendChild(b),k.appendChild(g),null!=l&&k.appendChild(l),k.appendChild(e));p.appendChild(k);p.appendChild(n);this.container=p},FindWindow=function(a,e,d,b,g){function k(a,c,b){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var f=0;f<c.length;f++)if("label"!=c[f].nodeName){var h=
+mxUtils.trim(c[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&h.substring(0,b.length)===b||null!=a&&a.test(h))return!0}}return!1}function n(){var a=p.model.getDescendants(p.model.getRoot()),b=q.value.toLowerCase(),h=t.checked?new RegExp(b):null,d=null;c!=b&&(c=b,f=null);var e=null==f;if(0<b.length)for(var g=0;g<a.length;g++){var n=p.view.getState(a[g]);if(null!=n&&null!=n.cell.value&&(e||null==d)&&(p.model.isVertex(n.cell)||p.model.isEdge(n.cell))&&(p.isHtmlLabel(n.cell)?
+(u.innerHTML=p.getLabel(n.cell),label=mxUtils.extractTextWithWhitespace([u])):label=p.getLabel(n.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==h&&(label.substring(0,b.length)===b||k(h,n.cell,b))||null!=h&&(h.test(label)||k(h,n.cell,b))))if(e){d=n;break}else null==d&&(d=n);e=e||n==f}null!=d?(f=d,p.scrollCellToVisible(f.cell),p.isEnabled()?p.setSelectionCell(f.cell):p.highlightCell(f.cell)):p.isEnabled()&&p.clearSelection();return 0==b.length||null!=d}
var l=a.actions.get("find"),p=a.editor.graph,c=null,f=null,h=document.createElement("div");h.style.userSelect="none";h.style.overflow="hidden";h.style.padding="10px";h.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";h.appendChild(q);mxUtils.br(h);var t=document.createElement("input");
t.setAttribute("type","checkbox");t.style.marginRight="4px";h.appendChild(t);mxUtils.write(h,mxResources.get("regularExpression"));var u=document.createElement("div");mxUtils.br(h);var w=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";c=f=null;q.focus()});w.setAttribute("title",mxResources.get("reset"));w.style.marginTop="6px";w.style.marginRight="4px";w.className="geBtn";h.appendChild(w);w=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=
n()?"":"#ffcfcf"}catch(x){a.handleError(x)}});w.setAttribute("title",mxResources.get("find")+" (Enter)");w.style.marginTop="6px";w.className="geBtn gePrimaryBtn";h.appendChild(w);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(c!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=n()?"":"#ffcfcf"}catch(y){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(h,"keydown",function(c){70==c.keyCode&&
-a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(l.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),h,d,e,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},
-TagsWindow=function(a,d,e,b,g){function k(a){a=null!=a?a:l.model.getDescendants(l.model.getRoot());for(var c=f.value.split(" "),b=[],h=0;h<a.length;h++)if(l.model.isVertex(a[h])||l.model.isEdge(a[h])){var e=null!=a[h].value&&"object"==typeof a[h].value?mxUtils.trim(a[h].value.getAttribute(p)||""):"",m=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),d=0;d<c.length&&m;d++)var t=mxUtils.trim(c[d]).toLowerCase(),m=m&&(0==t.length||0<=mxUtils.indexOf(e,t));else m=0==mxUtils.trim(f.value).length;
+a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(l.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),h,e,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},
+TagsWindow=function(a,e,d,b,g){function k(a){a=null!=a?a:l.model.getDescendants(l.model.getRoot());for(var c=f.value.split(" "),b=[],h=0;h<a.length;h++)if(l.model.isVertex(a[h])||l.model.isEdge(a[h])){var d=null!=a[h].value&&"object"==typeof a[h].value?mxUtils.trim(a[h].value.getAttribute(p)||""):"",m=!0;if(0<d.length)for(var d=d.toLowerCase().split(" "),e=0;e<c.length&&m;e++)var t=mxUtils.trim(c[e]).toLowerCase(),m=m&&(0==t.length||0<=mxUtils.indexOf(d,t));else m=0==mxUtils.trim(f.value).length;
m&&b.push(a[h])}return b}function n(a,c){l.model.beginUpdate();try{for(var b=0;b<a.length;b++)l.model.setVisible(a[b],c)}finally{l.model.endUpdate()}}var l=a.editor.graph,p="tags",c=document.createElement("div");c.style.userSelect="none";c.style.overflow="hidden";c.style.padding="10px";c.style.height="100%";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("allTags"));f.setAttribute("type","text");f.style.marginTop="4px";f.style.width="260px";f.style.fontSize="12px";
f.style.borderRadius="4px";f.style.padding="6px";c.appendChild(f);if(!a.isOffline()||mxClient.IS_CHROMEAPP){f.style.width="240px";var h=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");h.firstChild.style.marginBottom="6px";h.style.marginLeft="6px";c.appendChild(h)}mxEvent.addListener(f,"dblclick",function(){var c=new FilenameDialog(a,p,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(p=a)}),mxResources.get("enterPropertyName"));a.showDialog(c.container,
300,80,!0,!0);c.init()});f.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(c);h=mxUtils.button(mxResources.get("hide"),function(){n(k(),!1)});h.setAttribute("title",mxResources.get("hide"));h.style.marginTop="8px";h.style.marginRight="4px";h.className="geBtn";c.appendChild(h);h=mxUtils.button(mxResources.get("show"),function(){var a=k();n(a,!0);l.isEnabled()&&l.setSelectionCells(a)});h.setAttribute("title",mxResources.get("show"));h.style.marginTop="8px";h.style.marginRight=
-"4px";h.className="geBtn";c.appendChild(h);var q=a.actions.get("tags"),h=mxUtils.button(mxResources.get("close"),function(){q.funct()});h.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");h.style.marginTop="8px";h.className="geBtn gePrimaryBtn";c.appendChild(h);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),c,d,e,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
-this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},AuthDialog=function(a,d,e,b){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,
-mxResources.get("authorizationRequired"));var n="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";d==a.drive?(n=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(n=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(n=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(n=mxResources.get("github"),l.src=IMAGE_PATH+
-"/github-logo-white.svg"):d==a.trello&&(n=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[n]));var p=document.createElement("input");p.setAttribute("type","checkbox");n=mxUtils.button(mxResources.get("authorize"),function(){b(p.checked)});n.insertBefore(l,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";g.appendChild(k);g.appendChild(a);g.appendChild(n);e&&(e=document.createElement("p"),
-e.style.marginTop="20px",e.appendChild(p),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),e.appendChild(k),g.appendChild(e),p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,d,e){e=null!=e?e:a.sidebar.entries;var b=document.createElement("div");if(d){d=document.createElement("div");d.className="geDialogTitle";mxUtils.write(d,mxResources.get("shapes"));
-d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.lineHeight="40px";d.style.height="40px";d.style.right="0px";mxClient.IS_QUIRKS&&(d.style.width="718px");var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
-"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(d.style.width)-202+"px",k.style.height=g.style.height,k.style.marginTop=g.style.marginTop);var n=null,l=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";for(var c=0;c<e.length;c++)(function(b){var f=p.cloneNode(!1);f.style.fontWeight="bold";f.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";f.style.padding="6px 0px 6px 20px";mxUtils.write(f,b.title);g.appendChild(f);for(var h=0;h<b.entries.length;h++)(function(b){var f=p.cloneNode(!1);f.style.cursor="pointer";f.style.padding="4px 0px 4px 20px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.checked=a.sidebar.isEntryVisible(b.id);m.defaultChecked=m.checked;f.appendChild(m);mxUtils.write(f," "+b.title);g.appendChild(f);var e=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
-b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML='<img border="0" src="'+b.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=n&&(n.style.backgroundColor=""),n=f,n.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(f,"click",e);mxEvent.addListener(f,"dblclick",function(a){m.checked=!m.checked;mxEvent.consume(a)});l.push(function(){return m.checked?b.id:null});0==c&&0==h&&e()})(b.entries[h])})(e[c]);
-b.style.padding="30px";b.appendChild(d);b.appendChild(g);b.appendChild(k);e=document.createElement("div");e.className="geDialogFooter";e.style.position="absolute";e.style.paddingRight="16px";e.style.color="gray";e.style.left="0px";e.style.right="0px";e.style.bottom="0px";e.style.height="60px";e.style.lineHeight="52px";mxClient.IS_QUIRKS&&(e.style.width=d.style.width,e.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)d=
-document.createElement("span"),d.style.paddingRight="20px",d.appendChild(f),mxUtils.write(d," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(d,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(d.style.position="relative",d.style.top="-6px"),e.appendChild(d);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var h=mxUtils.button(mxResources.get("apply"),
-function(){a.hideDialog();for(var c=[],b=0;b<l.length;b++){var h=l[b].apply(this,arguments);null!=h&&c.push(h)}a.sidebar.showEntries(c.join(";"),f.checked,!0)});h.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),t=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var u=document.createElement("tr");q.style.width="100%";d=document.createElement("td");var h=document.createElement("td"),w=document.createElement("td"),x=mxUtils.bind(this,function(c,
-b,f){var h=document.createElement("input");h.type="checkbox";q.appendChild(h);h.checked=a.sidebar.isEntryVisible(f);var m=document.createElement("span");mxUtils.write(m,b);b=document.createElement("div");b.style.display="block";b.appendChild(h);b.appendChild(m);mxEvent.addListener(m,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return h.checked?f:null}});u.appendChild(d);u.appendChild(h);u.appendChild(w);t.appendChild(u);q.appendChild(t);for(var l=
-[],y=0,c=0;c<e.length;c++)for(t=0;t<e[c].entries.length;t++)y++;for(var m=[d,h,w],v=0,c=0;c<e.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];l.push(x(m[Math.floor(v/(y/3))],b.title,b.id));v++}})(e[c]);b.appendChild(q);e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,e.appendChild(f),d=document.createElement("span"),
-mxUtils.write(d," "+mxResources.get("rememberThisSetting")),e.appendChild(d),mxEvent.addListener(d,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));b.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";h=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<l.length;b++){var h=l[b].apply(this,arguments);null!=h&&c.push(h)}a.sidebar.showEntries(0<c.length?c.join(";"):"",f.checked);a.hideDialog()});h.className=
-"geBtn gePrimaryBtn";e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right"}a.editor.cancelFirst?(e.appendChild(d),e.appendChild(h)):(e.appendChild(h),e.appendChild(d));b.appendChild(e);this.container=b},PluginsDialog=function(a){function d(){if(0==g.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<g.length;c++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var e=document.createElement("span");e.className="geSprite geSprite-delete";
-e.style.position="relative";e.style.cursor="pointer";e.style.top="5px";e.style.marginRight="4px";e.style.display="inline-block";h.appendChild(e);mxUtils.write(h,g[c]);b.appendChild(h);mxUtils.br(b);mxEvent.addListener(e,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+g[c]+'"?',function(){g.splice(c,1);d()})}}(c))}}}var e=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();
-e.appendChild(b);d();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var e=b.split(";"),b=0;b<e.length;b++){var t=App.pluginRegistry[e[b]];null!=t&&(c+=t+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){e=a.split(";");for(a=0;a<e.length;a++)0<e[a].length&&0>mxUtils.indexOf(g,e[a])&&g.push(e[a]);d()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+
-")");a.showDialog(c.container,300,80,!0,!0);c.init()});k.className="geBtn";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";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");var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(n),c.appendChild(p),c.appendChild(k),c.appendChild(l)):(c.appendChild(p),c.appendChild(k),c.appendChild(l),c.appendChild(n));e.appendChild(c);this.container=e},CropImageDialog=function(a,d,e){var b=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),
+"4px";h.className="geBtn";c.appendChild(h);var q=a.actions.get("tags"),h=mxUtils.button(mxResources.get("close"),function(){q.funct()});h.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");h.style.marginTop="8px";h.className="geBtn gePrimaryBtn";c.appendChild(h);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),c,e,d,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
+this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},AuthDialog=function(a,e,d,b){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,
+mxResources.get("authorizationRequired"));var n="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";e==a.drive?(n=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==a.dropbox?(n=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(n=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==a.gitHub?(n=mxResources.get("github"),l.src=IMAGE_PATH+
+"/github-logo-white.svg"):e==a.trello&&(n=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[n]));var p=document.createElement("input");p.setAttribute("type","checkbox");n=mxUtils.button(mxResources.get("authorize"),function(){b(p.checked)});n.insertBefore(l,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";g.appendChild(k);g.appendChild(a);g.appendChild(n);d&&(d=document.createElement("p"),
+d.style.marginTop="20px",d.appendChild(p),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),d.appendChild(k),g.appendChild(d),p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,e,d){d=null!=d?d:a.sidebar.entries;var b=document.createElement("div");if(e){e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));
+e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
+"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(e.style.width)-202+"px",k.style.height=g.style.height,k.style.marginTop=g.style.marginTop);var n=null,l=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";for(var c=0;c<d.length;c++)(function(b){var f=p.cloneNode(!1);f.style.fontWeight="bold";f.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";f.style.padding="6px 0px 6px 20px";mxUtils.write(f,b.title);g.appendChild(f);for(var h=0;h<b.entries.length;h++)(function(b){var f=p.cloneNode(!1);f.style.cursor="pointer";f.style.padding="4px 0px 4px 20px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.checked=a.sidebar.isEntryVisible(b.id);m.defaultChecked=m.checked;f.appendChild(m);mxUtils.write(f," "+b.title);g.appendChild(f);var d=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
+b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML='<img border="0" src="'+b.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=n&&(n.style.backgroundColor=""),n=f,n.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(f,"click",d);mxEvent.addListener(f,"dblclick",function(a){m.checked=!m.checked;mxEvent.consume(a)});l.push(function(){return m.checked?b.id:null});0==c&&0==h&&d()})(b.entries[h])})(d[c]);
+b.style.padding="30px";b.appendChild(e);b.appendChild(g);b.appendChild(k);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=
+document.createElement("span"),e.style.paddingRight="20px",e.appendChild(f),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";var h=mxUtils.button(mxResources.get("apply"),
+function(){a.hideDialog();for(var c=[],b=0;b<l.length;b++){var h=l[b].apply(this,arguments);null!=h&&c.push(h)}a.sidebar.showEntries(c.join(";"),f.checked,!0)});h.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),t=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var u=document.createElement("tr");q.style.width="100%";e=document.createElement("td");var h=document.createElement("td"),w=document.createElement("td"),x=mxUtils.bind(this,function(c,
+b,f){var h=document.createElement("input");h.type="checkbox";q.appendChild(h);h.checked=a.sidebar.isEntryVisible(f);var m=document.createElement("span");mxUtils.write(m,b);b=document.createElement("div");b.style.display="block";b.appendChild(h);b.appendChild(m);mxEvent.addListener(m,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return h.checked?f:null}});u.appendChild(e);u.appendChild(h);u.appendChild(w);t.appendChild(u);q.appendChild(t);for(var l=
+[],y=0,c=0;c<d.length;c++)for(t=0;t<d[c].entries.length;t++)y++;for(var m=[e,h,w],v=0,c=0;c<d.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];l.push(x(m[Math.floor(v/(y/3))],b.title,b.id));v++}})(d[c]);b.appendChild(q);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,d.appendChild(f),e=document.createElement("span"),
+mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";h=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<l.length;b++){var h=l[b].apply(this,arguments);null!=h&&c.push(h)}a.sidebar.showEntries(0<c.length?c.join(";"):"",f.checked);a.hideDialog()});h.className=
+"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(h)):(d.appendChild(h),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function e(){if(0==g.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<g.length;c++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var d=document.createElement("span");d.className="geSprite geSprite-delete";
+d.style.position="relative";d.style.cursor="pointer";d.style.top="5px";d.style.marginRight="4px";d.style.display="inline-block";h.appendChild(d);mxUtils.write(h,g[c]);b.appendChild(h);mxUtils.br(b);mxEvent.addListener(d,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+g[c]+'"?',function(){g.splice(c,1);e()})}}(c))}}}var d=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();
+d.appendChild(b);e();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var d=b.split(";"),b=0;b<d.length;b++){var t=App.pluginRegistry[d[b]];null!=t&&(c+=t+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){d=a.split(";");for(a=0;a<d.length;a++){var c=d[a],b=App.pluginRegistry[c];null!=b&&(c=b);0<c.length&&0>mxUtils.indexOf(g,c)&&g.push(c)}e()}},mxResources.get("enterValue")+
+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});k.className="geBtn";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";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");var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(n),c.appendChild(p),c.appendChild(k),c.appendChild(l)):(c.appendChild(p),c.appendChild(k),c.appendChild(l),c.appendChild(n));d.appendChild(c);this.container=d},CropImageDialog=function(a,e,d){var b=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),
n=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");n.appendChild(l);k.appendChild(n);var n=document.createElement("tr"),p=document.createElement("td"),c=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();
f.select()};c.appendChild(f);n.appendChild(p);n.appendChild(c);k.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";c.appendChild(h);n.appendChild(p);n.appendChild(c);k.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("right")+
":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";c.appendChild(q);n.appendChild(p);n.appendChild(c);k.appendChild(n);n=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";c.appendChild(t);n.appendChild(p);n.appendChild(c);k.appendChild(n);n=document.createElement("tr");
-p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");n.appendChild(p);var u=document.createElement("input");u.setAttribute("type","checkbox");c.appendChild(u);n.appendChild(c);k.appendChild(n);g.appendChild(k);b.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),d=w.width,
-g=w.height,x=parseInt(f.value),k=parseInt(h.value),d=Math.max(1,d-x-parseInt(q.value)),g=Math.max(1,g-k-parseInt(t.value));c.width=d;c.height=g;u.checked&&(b.fillStyle="#000000",b.arc(d/2,g/2,Math.min(d/2,g/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation="source-in");b.drawImage(w,x,k,d,g,0,0,d,g);e(c.toDataURL())});x.setAttribute("disabled","disabled");w.onload=function(){x.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+
-": "+w.height)};w.src=d;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&x.click()});d=document.createElement("div");d.style.marginTop="20px";d.style.textAlign="right";a.editor.cancelFirst?(d.appendChild(g),d.appendChild(x)):(d.appendChild(x),d.appendChild(g));b.appendChild(d);this.container=b},EditGeometryDialog=function(a,d){var e=a.editor.graph,b=1==d.length?e.getCellGeometry(d[0]):null,g=document.createElement("div"),k=document.createElement("table"),n=document.createElement("tbody"),
+p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");n.appendChild(p);var u=document.createElement("input");u.setAttribute("type","checkbox");c.appendChild(u);n.appendChild(c);k.appendChild(n);g.appendChild(k);b.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),e=w.width,
+g=w.height,x=parseInt(f.value),k=parseInt(h.value),e=Math.max(1,e-x-parseInt(q.value)),g=Math.max(1,g-k-parseInt(t.value));c.width=e;c.height=g;u.checked&&(b.fillStyle="#000000",b.arc(e/2,g/2,Math.min(e/2,g/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation="source-in");b.drawImage(w,x,k,e,g,0,0,e,g);d(c.toDataURL())});x.setAttribute("disabled","disabled");w.onload=function(){x.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+
+": "+w.height)};w.src=e;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&x.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(g),e.appendChild(x)):(e.appendChild(x),e.appendChild(g));b.appendChild(e);this.container=b},EditGeometryDialog=function(a,e){var d=a.editor.graph,b=1==e.length?d.getCellGeometry(e[0]):null,g=document.createElement("div"),k=document.createElement("table"),n=document.createElement("tbody"),
l=document.createElement("tr"),p=document.createElement("td"),c=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=b?b.x:"";this.init=function(){f.focus();f.select()};c.appendChild(f);l.appendChild(p);l.appendChild(c);n.appendChild(l);l=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("top")+
":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=b?b.y:"";c.appendChild(h);l.appendChild(p);l.appendChild(c);n.appendChild(l);l=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.width:"";c.appendChild(q);l.appendChild(p);l.appendChild(c);n.appendChild(l);
l=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.height:"";c.appendChild(t);l.appendChild(p);l.appendChild(c);n.appendChild(l);l=document.createElement("tr");p=document.createElement("td");c=document.createElement("td");mxUtils.write(p,mxResources.get("rotation")+":");var u=document.createElement("input");
-u.setAttribute("type","text");u.style.width="100px";u.value=1==d.length?mxUtils.getValue(e.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(u);l.appendChild(p);l.appendChild(c);n.appendChild(l);k.appendChild(n);g.appendChild(k);var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e.getModel().beginUpdate();try{for(var c=0;c<d.length;c++){var b=e.getCellGeometry(d[c]);null!=b&&(b=b.clone(),e.isCellMovable(d[c])&&
-(0<mxUtils.trim(f.value).length&&(b.x=Number(f.value)),0<mxUtils.trim(h.value).length&&(b.y=Number(h.value))),e.isCellResizable(d[c])&&(0<mxUtils.trim(q.value).length&&(b.width=Number(q.value)),0<mxUtils.trim(t.value).length&&(b.height=Number(t.value))),e.getModel().setGeometry(d[c],b));0<mxUtils.trim(u.value).length&&e.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[d[c]])}}finally{e.getModel().endUpdate()}});mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&w.click()});k=document.createElement("div");
-k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(w)):(k.appendChild(w),k.appendChild(b));g.appendChild(k);this.container=g},LibraryDialog=function(a,d,e,b,g,k){function n(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var c=null;if(null!=a)for(var b=t.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function l(c,b,h,e,d,g,q,k,y){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&
-null!=q||null==w[c]){var B=function(){C.innerHTML="";C.style.cursor="pointer";C.style.whiteSpace="nowrap";C.style.textOverflow="ellipsis";mxUtils.write(C,null!=H.title&&0<H.title.length?H.title:mxResources.get("untitled"));C.style.color=null==H.title||0==H.title.length?"#d0d0d0":""};t.style.backgroundImage="";u.style.display="none";var D=d,p=g;if(d>a.maxImageSize||g>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,d)),a.maxImageSize/Math.max(1,g));d*=A;g*=A}D>p?(p=Math.round(100*
+u.setAttribute("type","text");u.style.width="100px";u.value=1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(u);l.appendChild(p);l.appendChild(c);n.appendChild(l);k.appendChild(n);g.appendChild(k);var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var b=d.getCellGeometry(e[c]);null!=b&&(b=b.clone(),d.isCellMovable(e[c])&&
+(0<mxUtils.trim(f.value).length&&(b.x=Number(f.value)),0<mxUtils.trim(h.value).length&&(b.y=Number(h.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(q.value).length&&(b.width=Number(q.value)),0<mxUtils.trim(t.value).length&&(b.height=Number(t.value))),d.getModel().setGeometry(e[c],b));0<mxUtils.trim(u.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[e[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&w.click()});k=document.createElement("div");
+k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(w)):(k.appendChild(w),k.appendChild(b));g.appendChild(k);this.container=g},LibraryDialog=function(a,e,d,b,g,k){function n(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var c=null;if(null!=a)for(var b=t.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function l(c,b,h,d,e,g,q,k,y){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&
+null!=q||null==w[c]){var B=function(){C.innerHTML="";C.style.cursor="pointer";C.style.whiteSpace="nowrap";C.style.textOverflow="ellipsis";mxUtils.write(C,null!=H.title&&0<H.title.length?H.title:mxResources.get("untitled"));C.style.color=null==H.title||0==H.title.length?"#d0d0d0":""};t.style.backgroundImage="";u.style.display="none";var D=e,p=g;if(e>a.maxImageSize||g>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,g));e*=A;g*=A}D>p?(p=Math.round(100*
p/D),D=100):(D=Math.round(100*D/p),p=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move";mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=c){var L=document.createElement("img");L.setAttribute("src",v.convert(c));L.style.width=D+"px";L.style.height=p+"px";L.style.margin="10px";L.style.paddingBottom=Math.floor((100-p)/2)+"px";L.style.paddingLeft=
Math.floor((100-D)/2)+"px";F.appendChild(L)}else if(null!=q){var K=a.stringToCells(a.editor.graph.decompress(q.xml));0<K.length&&(a.sidebar.createThumb(K,100,100,F,null,!0,!1),F.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",F.firstChild.style.cursor="")}var G=document.createElement("img");G.setAttribute("src",Editor.closeImage);G.setAttribute("border","0");G.setAttribute("title",mxResources.get("delete"));G.setAttribute("align","top");G.style.paddingTop="4px";G.style.marginLeft=
"-22px";G.style.cursor="pointer";mxEvent.addListener(G,"dragstart",function(a){mxEvent.consume(a)});null==c&&null!=q&&(G.style.position="relative");(function(a,c,b){mxEvent.addListener(G,"click",function(h){w[c]=null;for(var m=0;m<f.length;m++)if(null!=f[m].data&&f[m].data==c||null!=f[m].xml&&null!=b&&f[m].xml==b.xml){f.splice(m,1);break}F.parentNode.removeChild(a);0==f.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(h)});mxEvent.addListener(G,
-"dblclick",function(a){mxEvent.consume(a)})})(F,c,q);F.appendChild(G);F.style.marginBottom="30px";var C=document.createElement("div");C.style.position="absolute";C.style.boxSizing="border-box";C.style.bottom="-18px";C.style.left="10px";C.style.right="10px";C.style.backgroundColor="#ffffff";C.style.overflow="hidden";C.style.textAlign="center";var H=null;null!=c?(H={data:c,w:d,h:g,title:y},null!=k&&(H.aspect=k),w[c]=L,f.push(H)):null!=q&&(q.aspect="fixed",f.push(q),H=q);mxEvent.addListener(C,"keydown",
+"dblclick",function(a){mxEvent.consume(a)})})(F,c,q);F.appendChild(G);F.style.marginBottom="30px";var C=document.createElement("div");C.style.position="absolute";C.style.boxSizing="border-box";C.style.bottom="-18px";C.style.left="10px";C.style.right="10px";C.style.backgroundColor="#ffffff";C.style.overflow="hidden";C.style.textAlign="center";var H=null;null!=c?(H={data:c,w:e,h:g,title:y},null!=k&&(H.aspect=k),w[c]=L,f.push(H)):null!=q&&(q.aspect="fixed",f.push(q),H=q);mxEvent.addListener(C,"keydown",
function(a){13==a.keyCode&&null!=m&&(m(),m=null,mxEvent.consume(a))});B();F.appendChild(C);mxEvent.addListener(C,"mousedown",function(a){"true"!=C.getAttribute("contentEditable")&&mxEvent.consume(a)});K=function(c){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,H.title||"",mxResources.get("ok"),function(a){null!=a&&(H.title=a,B())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();
mxEvent.consume(c)}else if("true"!=C.getAttribute("contentEditable")){null!=m&&(m(),m=null);if(null==H.title||0==H.title.length)C.innerHTML="";C.style.textOverflow="";C.style.whiteSpace="";C.style.cursor="text";C.style.color="";C.setAttribute("contentEditable","true");C.focus();document.execCommand("selectAll",!1,null);m=function(){C.removeAttribute("contentEditable");C.style.cursor="pointer";H.title=C.innerHTML;B()};mxEvent.consume(c)}};mxEvent.addListener(C,"click",K);mxEvent.addListener(F,"dblclick",
K);t.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==c&&null!=q&&(G.style.visibility="hidden",C.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);x=n(a);mxClient.IS_GC&&(F.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);G.style.visibility="";C.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==G.style.visibility&&(G.style.visibility=
-"",C.style.visibility="");x=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{d=!1;try{if(a.spinner.stop(),D=mxUtils.parseXml(c),"mxlibrary"==D.documentElement.nodeName){p=JSON.parse(mxUtils.getTextContent(D.documentElement));if(null!=p&&0<p.length)for(var E=0;E<p.length;E++)null!=p[E].xml?l(null,null,0,0,0,0,p[E]):l(p[E].data,null,0,0,p[E].w,p[E].h,null,"fixed",p[E].title);d=!0}else if("mxfile"==
-D.documentElement.nodeName){for(var O=D.documentElement.getElementsByTagName("diagram"),E=0;E<O.length;E++){var p=mxUtils.getTextContent(O[E]),K=a.stringToCells(a.editor.graph.decompress(p)),Q=a.editor.graph.getBoundingBoxFromGeometry(K);l(null,null,0,0,0,0,{xml:p,w:Q.width,h:Q.height})}d=!0}}catch(Z){}d||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function p(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
+"",C.style.visibility="");x=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),D=mxUtils.parseXml(c),"mxlibrary"==D.documentElement.nodeName){p=JSON.parse(mxUtils.getTextContent(D.documentElement));if(null!=p&&0<p.length)for(var E=0;E<p.length;E++)null!=p[E].xml?l(null,null,0,0,0,0,p[E]):l(p[E].data,null,0,0,p[E].w,p[E].h,null,"fixed",p[E].title);e=!0}else if("mxfile"==
+D.documentElement.nodeName){for(var O=D.documentElement.getElementsByTagName("diagram"),E=0;E<O.length;E++){var p=mxUtils.getTextContent(O[E]),K=a.stringToCells(a.editor.graph.decompress(p)),Q=a.editor.graph.getBoundingBoxFromGeometry(K);l(null,null,0,0,0,0,{xml:p,w:Q.width,h:Q.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function p(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
function c(c){c.stopPropagation();c.preventDefault();z=!1;y=n(c);if(null!=x)null!=y&&y<t.children.length?(f.splice(y>x?y-1:y,0,f.splice(x,1)[0]),t.insertBefore(t.children[x],t.children[y])):(f.push(f.splice(x,1)[0]),t.appendChild(t.children[x]));else if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,D(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||
-/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){l(b,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}c.stopPropagation();c.preventDefault()}var f=[];e=document.createElement("div");e.style.height="100%";var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.height="40px";e.appendChild(h);mxUtils.write(h,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",
-d);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==g||g.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};h.appendChild(q);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";
-t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));e.appendChild(u);var w={},x=null,y=null,m=null;
-d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=m&&(m(),m=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",d);mxEvent.addListener(t,"pointerdown",d);mxEvent.addListener(t,"touchstart",d);var v=new mxUrlConverter,z=!1;if(null!=b)for(d=0;d<b.length;d++)h=b[d],l(h.data,null,0,0,h.w,h.h,h,h.aspect,h.title);mxEvent.addListener(t,"dragleave",function(a){u.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==t||c==u){a.stopPropagation();a.preventDefault();
-break}c=c.parentNode}});var D=function(c){return function(b,f,h,m,e,d,g,q,v){null!=v&&(/(\.vsdx)($|\?)/i.test(v.name)||/(\.vssx)($|\?)/i.test(v.name))?a.importVisio(v,mxUtils.bind(this,function(b){a.spinner.stop();l(b,f,h,m,e,d,g,"fixed",mxEvent.isAltDown(c)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,v.name)?a.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=
-b.status&&(l(b.responseText,f,h,m,e,d,g,"fixed",mxEvent.isAltDown(c)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(b,f,h,m,e,d,g,"fixed",mxEvent.isAltDown(c)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",p);mxEvent.addListener(t,"drop",c);mxEvent.addListener(u,"dragover",p);mxEvent.addListener(u,"drop",c);e.appendChild(t);b=document.createElement("div");b.style.textAlign="right";
-b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);h=mxUtils.button(mxResources.get("export"),function(){var c=a.createLibraryDataFromImages(f),b=q.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,
-"_blank")});h.setAttribute("id","btnDownload");h.className="geBtn";b.appendChild(h);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(c){z=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,b,f,h,m,e,d,g,t){D(c)(a,b,f,h,m,e,d,g,t);A.value=""});t.scrollTop=t.scrollHeight}),h=mxUtils.button(mxResources.get("import"),function(){null!=m&&(m(),m=null);A.click()}),h.setAttribute("id",
+/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){l(b,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}c.stopPropagation();c.preventDefault()}var f=[];d=document.createElement("div");d.style.height="100%";var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.height="40px";d.appendChild(h);mxUtils.write(h,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",
+e);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==g||g.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};h.appendChild(q);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";
+t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));d.appendChild(u);var w={},x=null,y=null,m=null;
+e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=m&&(m(),m=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",e);mxEvent.addListener(t,"pointerdown",e);mxEvent.addListener(t,"touchstart",e);var v=new mxUrlConverter,z=!1;if(null!=b)for(e=0;e<b.length;e++)h=b[e],l(h.data,null,0,0,h.w,h.h,h,h.aspect,h.title);mxEvent.addListener(t,"dragleave",function(a){u.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==t||c==u){a.stopPropagation();a.preventDefault();
+break}c=c.parentNode}});var D=function(c){return function(b,f,h,m,d,e,g,q,v){null!=v&&(/(\.vsdx)($|\?)/i.test(v.name)||/(\.vssx)($|\?)/i.test(v.name))?a.importVisio(v,mxUtils.bind(this,function(b){a.spinner.stop();l(b,f,h,m,d,e,g,"fixed",mxEvent.isAltDown(c)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,v.name)?a.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=
+b.status&&(l(b.responseText,f,h,m,d,e,g,"fixed",mxEvent.isAltDown(c)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(b,f,h,m,d,e,g,"fixed",mxEvent.isAltDown(c)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",p);mxEvent.addListener(t,"drop",c);mxEvent.addListener(u,"dragover",p);mxEvent.addListener(u,"drop",c);d.appendChild(t);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);h=mxUtils.button(mxResources.get("export"),function(){var c=a.createLibraryDataFromImages(f),b=q.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,
+"_blank")});h.setAttribute("id","btnDownload");h.className="geBtn";b.appendChild(h);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(c){z=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,b,f,h,m,d,e,g,t){D(c)(a,b,f,h,m,d,e,g,t);A.value=""});t.scrollTop=t.scrollHeight}),h=mxUtils.button(mxResources.get("import"),function(){null!=m&&(m(),m=null);A.click()}),h.setAttribute("id",
"btnAddImage"),h.className="geBtn",b.appendChild(h));h=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=m&&(m(),m=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){z=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}l(a,null,0,0,c,b);t.scrollTop=t.scrollHeight}})});h.setAttribute("id","btnAddImageUrl");h.className="geBtn";b.appendChild(h);this.saveBtnClickHandler=function(c,b,f,h){a.saveLibrary(c,
-b,f,h)};h=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=m&&(m(),m=null);this.saveBtnClickHandler(q.value,f,g,k)}));h.setAttribute("id","btnSave");h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(d);e.appendChild(b);this.container=e},EditShapeDialog=function(a,d,e,b,g){b=null!=b?b:300;g=null!=g?g:120;var k,n,l=document.createElement("table"),p=document.createElement("tbody");l.style.cellPadding="4px";k=document.createElement("tr");n=
-document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";mxUtils.write(n,e);k.appendChild(n);p.appendChild(k);k=document.createElement("tr");n=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=g+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};n.appendChild(c);k.appendChild(n);n=document.createElement("td");e=document.createElement("div");e.style.position=
-"relative";e.style.border="1px solid gray";e.style.top="6px";e.style.width="200px";e.style.height=g+4+"px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);n.appendChild(e);var f=new Graph(e);f.setEnabled(!1);var h=a.editor.graph.cloneCells([d])[0];f.addCells([h]);e=f.view.getState(h);var q="";null!=e.shape&&null!=e.shape.stencil&&(q=mxUtils.getPrettyXml(e.shape.stencil.desc));mxUtils.write(c,q||"");e=f.getGraphBounds();g=Math.min(160/e.width,(g-40)/e.height);f.view.scaleAndTranslate(g,
-20/g-e.x,20/g-e.y);k.appendChild(n);p.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.paddingTop="2px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&n.appendChild(g);a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-e.className="geBtn",n.appendChild(e));var t=function(b,f,h){var e=c.value,m=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(h&&a.hideDialog(),m=!b.model.contains(f),!h||m||e!=q){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(m){var d=a.editor.graph.getInsertPoint();f.geometry.x=d.x;
-f.geometry.y=d.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(z){throw z;}finally{b.getModel().endUpdate()}m&&b.setSelectionCell(f)}};e=mxUtils.button(mxResources.get("preview"),function(){t(f,h,!1)});e.className="geBtn";n.appendChild(e);e=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,d,!0)});e.className="geBtn gePrimaryBtn";n.appendChild(e);a.editor.cancelFirst||n.appendChild(g);k.appendChild(n);p.appendChild(k);l.appendChild(p);this.container=
-l},CustomDialog=function(a,d,e,b,g,k,n,l){var p=document.createElement("div");p.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=n&&d.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";l&&(n.style.display="none");a.editor.cancelFirst&&d.appendChild(n);a.isOffline()||null==k||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),l.className="geBtn",d.appendChild(l));
-g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e()});d.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(n);p.appendChild(d);this.cancelBtn=n;this.okButton=g;this.container=p};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
+b,f,h)};h=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=m&&(m(),m=null);this.saveBtnClickHandler(q.value,f,g,k)}));h.setAttribute("id","btnSave");h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(e);d.appendChild(b);this.container=d},EditShapeDialog=function(a,e,d,b,g){b=null!=b?b:300;g=null!=g?g:120;var k,n,l=document.createElement("table"),p=document.createElement("tbody");l.style.cellPadding="4px";k=document.createElement("tr");n=
+document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";mxUtils.write(n,d);k.appendChild(n);p.appendChild(k);k=document.createElement("tr");n=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=g+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};n.appendChild(c);k.appendChild(n);n=document.createElement("td");d=document.createElement("div");d.style.position=
+"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=g+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);n.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var h=a.editor.graph.cloneCells([e])[0];f.addCells([h]);d=f.view.getState(h);var q="";null!=d.shape&&null!=d.shape.stencil&&(q=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(c,q||"");d=f.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);f.view.scaleAndTranslate(g,
+20/g-d.x,20/g-d.y);k.appendChild(n);p.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.paddingTop="2px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&n.appendChild(g);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
+d.className="geBtn",n.appendChild(d));var t=function(b,f,h){var d=c.value,m=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(h&&a.hideDialog(),m=!b.model.contains(f),!h||m||d!=q){d=a.editor.graph.compress(d);b.getModel().beginUpdate();try{if(m){var e=a.editor.graph.getInsertPoint();f.geometry.x=e.x;
+f.geometry.y=e.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[f])}catch(z){throw z;}finally{b.getModel().endUpdate()}m&&b.setSelectionCell(f)}};d=mxUtils.button(mxResources.get("preview"),function(){t(f,h,!1)});d.className="geBtn";n.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";n.appendChild(d);a.editor.cancelFirst||n.appendChild(g);k.appendChild(n);p.appendChild(k);l.appendChild(p);this.container=
+l},CustomDialog=function(a,e,d,b,g,k,n,l){var p=document.createElement("div");p.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="right";null!=n&&e.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";l&&(n.style.display="none");a.editor.cancelFirst&&e.appendChild(n);a.isOffline()||null==k||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),l.className="geBtn",e.appendChild(l));
+g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});e.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(n);p.appendChild(e);this.cancelBtn=n;this.okButton=g;this.container=p};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
@@ -6717,12 +6717,12 @@ a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyl
"text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):
null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(h=new mxCodec(f.ownerDocument),h.decode(f,
this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var h=new mxCodec(f.ownerDocument);h.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);
+mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);
null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),
null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(v){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var h=0;h<b.length;h++)if("mxgraph"==b[h].getAttribute("class")){f.push(b[h]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),
a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=this.graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};
-null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
-null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
+null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
c){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var h=document.createElement("script");h.type="text/javascript";h.src=a;f[0].parentNode.appendChild(h)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
@@ -6734,13 +6734,13 @@ function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{insta
{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=
mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+
-" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var h=f.getModel().getStyle(b[c]),m=0;m<e.length;m++)h=mxUtils.removeStylename(h,e[m]);null!=a?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,
+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var h=f.getModel().getStyle(b[c]),m=0;m<d.length;m++)h=mxUtils.removeStylename(h,d[m]);null!=a?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,
a.fill),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,a.stroke),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,"#000000"),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,null));f.getModel().setStyle(b[c],h)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=
a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");h.appendChild(c)}h.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,
-4)&&mxUtils.br(h),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(h);var e="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(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var d=document.createElement("div");d.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(d,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var g=document.createElement("div");g.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(d),a.appendChild(g));mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(d);b(g);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+4)&&mxUtils.br(h),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(h);var d="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(" ");
+null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var g=document.createElement("div");g.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;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(e),a.appendChild(g));mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(e);b(g);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,h=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=h&&null!=h.shape&&null!=h.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));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=
@@ -6759,41 +6759,41 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=
[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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 c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,h,e,d,g,t,q){if(null!=b&&null==mxMarker.markers[b]){var m=this.getPackageForType(b);null!=m&&mxStencilRegistry.getStencil(m)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){l.value=Math.max(1,
-Math.min(g,Math.max(parseInt(l.value),parseInt(n.value))));n.value=Math.max(1,Math.min(g,Math.min(parseInt(l.value),parseInt(n.value))))}function f(c){function b(c,b,h){var m=c.getGraphBounds(),e=0,d=0,g=Z.get(),q=1/c.pageScale,t=y.checked;if(t)var q=parseInt(N.value),u=parseInt(Q.value),q=Math.min(g.height*u/(m.height/c.view.scale),g.width*q/(m.width/c.view.scale));else q=parseInt(p.value)/(100*c.pageScale),isNaN(q)&&(f=1/c.pageScale,p.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*
-f);g.height=Math.ceil(g.height*f);q*=f;!t&&c.pageVisible?(m=c.getPageLayout(),e-=m.x*g.width,d-=m.y*g.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,q,g,0,e,d,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage=
-function(a,c,b,f,h,m){var e=v.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,h,!0)}else{g=c.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=t;b.appendGraph(c,q,e,d,h,!0)}return b}var f=parseInt(W.value)/100;isNaN(f)&&(f=1,W.value="100 %");var f=.75*f,m=n.value,d=l.value,e=!u.checked,g=null;e&&(e=m==t&&d==t);if(!e&&null!=a.pages&&a.pages.length){var q=0,e=a.pages.length-1;u.checked||
-(q=parseInt(m)-1,e=parseInt(d)-1);for(var v=q;v<=e;v++){var k=a.pages[v],m=k==a.currentPage?h:null;if(null==m){var m=a.createTemporaryGraph(h.getStylesheet()),d=!0,q=!1,w=null,x=null;null==k.viewState&&null==k.mapping&&null==k.root&&a.updatePageRoot(k);null!=k.viewState?(d=k.viewState.pageVisible,q=k.viewState.mathEnabled,w=k.viewState.background,x=k.viewState.backgroundImage):null!=k.mapping&&null!=k.mapping.diagramMap&&(q="0"!=k.mapping.diagramMap.get("mathEnabled"),w=k.mapping.diagramMap.get("background"),
-x=k.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);m.background=w;m.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;m.pageVisible=d;m.mathEnabled=q;var B=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?v+1:B.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(k);m.model.setRoot(k.root)}g=b(m,g,v!=e);m!=h&&m.container.parentNode.removeChild(m.container)}}else g=b(h);g.mathEnabled&&
-(e=g.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),
-e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),c&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));g.closeDocument();!g.mathEnabled&&c&&PrintDialog.printPreview(g)}var h=a.editor.graph,e=document.createElement("div"),d=document.createElement("h3");
-d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,c||mxResources.get("print"));e.appendChild(d);var g=1,t=1,q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");u.setAttribute("name","pages-printdialog");q.appendChild(u);d=document.createElement("span");
-mxUtils.write(d,mxResources.get("printAllPages"));q.appendChild(d);mxUtils.br(q);var k=u.cloneNode(!0);u.setAttribute("checked","checked");k.setAttribute("value","range");q.appendChild(k);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+":");q.appendChild(d);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";q.appendChild(n);d=document.createElement("span");
-mxUtils.write(d,mxResources.get("to"));q.appendChild(d);var l=n.cloneNode(!0);q.appendChild(l);mxEvent.addListener(n,"focus",function(){k.checked=!0});mxEvent.addListener(l,"focus",function(){k.checked=!0});mxEvent.addListener(n,"change",b);mxEvent.addListener(l,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(d=0;d<a.pages.length;d++)if(a.currentPage==a.pages[d]){t=d+1;n.value=t;l.value=t;break}n.setAttribute("max",g);l.setAttribute("max",g);1<g&&e.appendChild(q);var w=document.createElement("div");
-w.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");w.appendChild(x);d=document.createElement("span");mxUtils.write(d,mxResources.get("adjustTo"));w.appendChild(d);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";w.appendChild(p);mxEvent.addListener(p,"focus",function(){x.checked=!0});
-e.appendChild(w);var q=q.cloneNode(!1),y=x.cloneNode(!0);y.setAttribute("value","fit");x.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";d.appendChild(y);q.appendChild(d);w=document.createElement("table");w.style.display="inline-block";var P=document.createElement("tbody"),M=document.createElement("tr"),R=M.cloneNode(!0),I=document.createElement("td"),J=I.cloneNode(!0),Y=I.cloneNode(!0),U=I.cloneNode(!0),
-V=I.cloneNode(!0),X=I.cloneNode(!0);I.style.textAlign="right";U.style.textAlign="right";mxUtils.write(I,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";J.appendChild(N);d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsAcross"));Y.appendChild(d);mxUtils.write(U,mxResources.get("fitToBy"));var Q=N.cloneNode(!0);V.appendChild(Q);
-mxEvent.addListener(N,"focus",function(){y.checked=!0});mxEvent.addListener(Q,"focus",function(){y.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));X.appendChild(d);M.appendChild(I);M.appendChild(J);M.appendChild(Y);R.appendChild(U);R.appendChild(V);R.appendChild(X);P.appendChild(M);P.appendChild(R);w.appendChild(P);q.appendChild(w);e.appendChild(q);q=document.createElement("div");d=document.createElement("div");d.style.fontWeight="bold";d.style.marginBottom=
-"12px";mxUtils.write(d,mxResources.get("paperSize"));q.appendChild(d);d=document.createElement("div");d.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(d,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(d);d=document.createElement("span");mxUtils.write(d,mxResources.get("pageScale"));q.appendChild(d);var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";q.appendChild(W);
-e.appendChild(q);d=document.createElement("div");d.style.cssText="text-align:right;margin:62px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&d.appendChild(q);a.isOffline()||(w=mxUtils.button(mxResources.get("help"),function(){h.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),w.className="geBtn",d.appendChild(w));PrintDialog.previewEnabled&&(w=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();
-f(!1)}),w.className="geBtn",d.appendChild(w));w=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});w.className="geBtn gePrimaryBtn";d.appendChild(w);a.editor.cancelFirst||d.appendChild(q);e.appendChild(d);this.container=e};var w=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=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,h,d,e,g,t,q){if(null!=b&&null==mxMarker.markers[b]){var m=this.getPackageForType(b);null!=m&&mxStencilRegistry.getStencil(m)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){l.value=Math.max(1,
+Math.min(g,Math.max(parseInt(l.value),parseInt(n.value))));n.value=Math.max(1,Math.min(g,Math.min(parseInt(l.value),parseInt(n.value))))}function f(c){function b(c,b,h){var m=c.getGraphBounds(),d=0,e=0,g=Z.get(),q=1/c.pageScale,t=y.checked;if(t)var q=parseInt(N.value),u=parseInt(Q.value),q=Math.min(g.height*u/(m.height/c.view.scale),g.width*q/(m.width/c.view.scale));else q=parseInt(p.value)/(100*c.pageScale),isNaN(q)&&(f=1/c.pageScale,p.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*
+f);g.height=Math.ceil(g.height*f);q*=f;!t&&c.pageVisible?(m=c.getPageLayout(),d-=m.x*g.width,e-=m.y*g.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,q,g,0,d,e,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=b.renderPage;b.renderPage=
+function(a,c,b,f,h,m){var d=v.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:d.className="geDisableMathJax";return d}}b.open(null,null,h,!0)}else{g=c.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=t;b.appendGraph(c,q,d,e,h,!0)}return b}var f=parseInt(W.value)/100;isNaN(f)&&(f=1,W.value="100 %");var f=.75*f,m=n.value,e=l.value,d=!u.checked,g=null;d&&(d=m==t&&e==t);if(!d&&null!=a.pages&&a.pages.length){var q=0,d=a.pages.length-1;u.checked||
+(q=parseInt(m)-1,d=parseInt(e)-1);for(var v=q;v<=d;v++){var k=a.pages[v],m=k==a.currentPage?h:null;if(null==m){var m=a.createTemporaryGraph(h.getStylesheet()),e=!0,q=!1,w=null,x=null;null==k.viewState&&null==k.mapping&&null==k.root&&a.updatePageRoot(k);null!=k.viewState?(e=k.viewState.pageVisible,q=k.viewState.mathEnabled,w=k.viewState.background,x=k.viewState.backgroundImage):null!=k.mapping&&null!=k.mapping.diagramMap&&(q="0"!=k.mapping.diagramMap.get("mathEnabled"),w=k.mapping.diagramMap.get("background"),
+x=k.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);m.background=w;m.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;m.pageVisible=e;m.mathEnabled=q;var B=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?v+1:B.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(k);m.model.setRoot(k.root)}g=b(m,g,v!=d);m!=h&&m.container.parentNode.removeChild(m.container)}}else g=b(h);g.mathEnabled&&
+(d=g.wnd.document,d.writeln('<script type="text/x-mathjax-config">'),d.writeln("MathJax.Hub.Config({"),d.writeln('messageStyle: "none",'),d.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),d.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),d.writeln("TeX: {"),d.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),d.writeln("},"),d.writeln("tex2jax: {"),d.writeln('\tignoreClass: "geDisableMathJax"'),d.writeln("},"),
+d.writeln("asciimath2jax: {"),d.writeln('\tignoreClass: "geDisableMathJax"'),d.writeln("}"),d.writeln("});"),c&&(d.writeln("MathJax.Hub.Queue(function () {"),d.writeln("window.print();"),d.writeln("});")),d.writeln("\x3c/script>"),d.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));g.closeDocument();!g.mathEnabled&&c&&PrintDialog.printPreview(g)}var h=a.editor.graph,d=document.createElement("div"),e=document.createElement("h3");
+e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,c||mxResources.get("print"));d.appendChild(e);var g=1,t=1,q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");u.setAttribute("name","pages-printdialog");q.appendChild(u);e=document.createElement("span");
+mxUtils.write(e,mxResources.get("printAllPages"));q.appendChild(e);mxUtils.br(q);var k=u.cloneNode(!0);u.setAttribute("checked","checked");k.setAttribute("value","range");q.appendChild(k);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");q.appendChild(e);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";q.appendChild(n);e=document.createElement("span");
+mxUtils.write(e,mxResources.get("to"));q.appendChild(e);var l=n.cloneNode(!0);q.appendChild(l);mxEvent.addListener(n,"focus",function(){k.checked=!0});mxEvent.addListener(l,"focus",function(){k.checked=!0});mxEvent.addListener(n,"change",b);mxEvent.addListener(l,"change",b);if(null!=a.pages&&(g=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){t=e+1;n.value=t;l.value=t;break}n.setAttribute("max",g);l.setAttribute("max",g);1<g&&d.appendChild(q);var w=document.createElement("div");
+w.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");w.appendChild(x);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));w.appendChild(e);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";w.appendChild(p);mxEvent.addListener(p,"focus",function(){x.checked=!0});
+d.appendChild(w);var q=q.cloneNode(!1),y=x.cloneNode(!0);y.setAttribute("value","fit");x.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(y);q.appendChild(e);w=document.createElement("table");w.style.display="inline-block";var P=document.createElement("tbody"),M=document.createElement("tr"),R=M.cloneNode(!0),I=document.createElement("td"),J=I.cloneNode(!0),Y=I.cloneNode(!0),U=I.cloneNode(!0),
+V=I.cloneNode(!0),X=I.cloneNode(!0);I.style.textAlign="right";U.style.textAlign="right";mxUtils.write(I,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";J.appendChild(N);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));Y.appendChild(e);mxUtils.write(U,mxResources.get("fitToBy"));var Q=N.cloneNode(!0);V.appendChild(Q);
+mxEvent.addListener(N,"focus",function(){y.checked=!0});mxEvent.addListener(Q,"focus",function(){y.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));X.appendChild(e);M.appendChild(I);M.appendChild(J);M.appendChild(Y);R.appendChild(U);R.appendChild(V);R.appendChild(X);P.appendChild(M);P.appendChild(R);w.appendChild(P);q.appendChild(w);d.appendChild(q);q=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom=
+"12px";mxUtils.write(e,mxResources.get("paperSize"));q.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));q.appendChild(e);var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","100 %");W.style.width="60px";q.appendChild(W);
+d.appendChild(q);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&e.appendChild(q);a.isOffline()||(w=mxUtils.button(mxResources.get("help"),function(){h.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),w.className="geBtn",e.appendChild(w));PrintDialog.previewEnabled&&(w=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();
+f(!1)}),w.className="geBtn",e.appendChild(w));w=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});w.className="geBtn gePrimaryBtn";e.appendChild(w);a.editor.cancelFirst||e.appendChild(q);d.appendChild(e);this.container=d};var w=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)):(w.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))}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,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="8.4.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,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="8.4.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),h=new Image;h.onload=function(){try{b.getContext("2d").drawImage(h,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&
-6<a.length}catch(u){}};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(t){}try{b=document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(t){}})();
+6<a.length}catch(u){}};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(t){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(t){}})();
EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,h){localStorage.setItem(a,b);h()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,h){h=null!=h?h:24;var c=new Spinner({lines:12,
-length:h,width:Math.round(h/3),radius:Math.round(h/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(h,e){var d=!1;this.active||(f.call(this,h),this.active=!0,null!=e&&(d=document.createElement("div"),d.style.position="absolute",d.style.whiteSpace="nowrap",d.style.background="#4B4243",d.style.color="white",d.style.fontFamily="Helvetica, Arial",d.style.fontSize="9pt",d.style.padding="6px",d.style.paddingLeft="10px",d.style.paddingRight=
-"10px",d.style.zIndex=2E9,d.style.left=Math.max(0,a)+"px",d.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(d.style,"boxShadow","2px 2px 3px 0px #ddd"),d.innerHTML=e+"...",h.appendChild(d),c.status=d,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(d.style.left=Math.round(Math.max(0,a-d.offsetWidth/2))+"px",d.style.top=Math.round(Math.max(0,
-b+70-d.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(h,e)}));this.stop();return a}),d=!0);return d};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,h){function c(a,c){var b=d;d+=c;return a.substring(b,d)}function f(a){a=c(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var d=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);do{h=f(a);var e=c(a,4);if(null!=b&&b(d-8,e,h))break;value=c(a,h);c(a,4);if("IEND"==e)break}while(h)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(q){}return!1};
-var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var h=c.indexOf("&lt;mxfile ");if(0<=h){var d=c.lastIndexOf("&lt;/mxfile&gt;");d>h&&(b=c.substring(h,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(w){}return b};EditorUi.prototype.validateFileData=
-function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=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 e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g: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])),c.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!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,h,e,d,g,k,n,l,m){b=null!=b?b:this.editor.graph;d=null!=d?d:!1;l=null!=l?l:!0;var c,f=null;null==h||
+length:h,width:Math.round(h/3),radius:Math.round(h/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(h,d){var e=!1;this.active||(f.call(this,h),this.active=!0,null!=d&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight=
+"10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),e.innerHTML=d+"...",h.appendChild(e),c.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,
+b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(h,d)}));this.stop();return a}),e=!0);return e};var d=c.stop;c.stop=function(){d.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,h){function c(a,c){var b=e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+
+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);do{h=f(a);var d=c(a,4);if(null!=b&&b(e-8,d,h))break;value=c(a,h);c(a,4);if("IEND"==d)break}while(h)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(q){}return!1};
+var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var h=c.indexOf("&lt;mxfile ");if(0<=h){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>h&&(b=c.substring(h,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var d=mxUtils.parseXml(c),g=this.editor.extractGraphModel(d.documentElement,null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(w){}return b};EditorUi.prototype.validateFileData=
+function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,e=a.getElementsByTagName("diagram");
+if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=e.length-1;0<=d;d--){var g=this.updatePageRoot(new DiagramPage(e[d]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[d+1]));c.model.execute(new ChangePage(this,g,0==d?g: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])),c.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!=b)for(d=0;d<b.length;d++)c.model.execute(new ChangePage(this,b[d],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,h,e,d,g,k,n,l,m){b=null!=b?b:this.editor.graph;d=null!=d?d:!1;l=null!=l?l:!0;var c,f=null;null==h||
h.getMode()==App.MODE_DEVICE||h.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var t=a;if("mxfile"!=t.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),t=b.compress(q);if(b.decompress(t)!=q)return q;q=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(q,t);t=a.ownerDocument.createElement("mxfile");t.appendChild(q)}m?(t=t.cloneNode(!0),t.removeAttribute("userAgent"),t.removeAttribute("version"),t.removeAttribute("editor"),t.removeAttribute("type")):(t.setAttribute("userAgent",
navigator.userAgent),t.setAttribute("version",EditorUi.VERSION),t.setAttribute("editor","www.draw.io"),a=null!=h?h.getMode():this.mode,null!=a&&t.setAttribute("type",a));a=mxUtils.getXml(t);if(!g&&!d&&(k||null!=h&&/(\.html)$/i.test(h.getTitle())))a=this.getHtml2(mxUtils.getXml(t),b,null!=h?h.getTitle():null,c,f);else if(g||!d&&null!=h&&/(\.svg)$/i.test(h.getTitle()))null==h||h.getMode()!=App.MODE_DEVICE&&h.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,n,l,f);return a};EditorUi.prototype.getXmlFileData=
function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),
@@ -6860,11 +6860,11 @@ document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectUR
function(a,b){b=b||"";for(var c=atob(a),f=c.length,e=Math.ceil(f/1024),d=Array(e),g=0;g<e;++g){for(var k=1024*g,n=Math.min(k+1024,f),m=Array(n-k),v=0;k<n;++v,++k)m[v]=c[k].charCodeAt(0);d[g]=new Uint8Array(m)}return new Blob(d,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,h,e,d,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=d&&(!mxClient.IS_IOS||!navigator.standalone);d=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null==h||"image/"!=h.substring(0,
6)||"image/svg"==h.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,h,e);else c==App.MODE_DEVICE?this.doSaveLocalFile(a,b,h,e):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(a,b,h,e,c,f)}catch(z){this.handleError(z)}}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),
mxResources.get("download"),!1,g,k,null,null,4<d?3:4,a,h,e);this.showDialog(b.container,420,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,h){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(h?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+
-'"/></html>'),c.document.close())}else c=window.open("data:"+b+(h?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var d=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,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(h?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var e=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,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var f=b.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding=
"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var h=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});h.spin(this.exportDialog);
this.exportToCanvas(mxUtils.bind(this,function(a){h.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,h,e,d){this.isLocalFileSave()?this.saveLocalFile(h,
+function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,h,e,d){this.isLocalFileSave()?this.saveLocalFile(h,
a,e,d,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(h,a,e,d,b,c)}),h,d,e)};EditorUi.prototype.saveRequest=function(a,b,h,e,d,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=h("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,
mxUtils.bind(this,function(h){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,c,h)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,c,h)}catch(D){this.handleError(D)}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,null,4<c?3:4,e,g,d);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,h,e,d,g){};EditorUi.prototype.pickFolder=function(a,b,h){b(null)};EditorUi.prototype.exportSvg=function(a,b,h,e,d,g,k,n,l){if(this.spinner.spin(document.body,
@@ -6952,7 +6952,7 @@ function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})
b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(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):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>
b};EditorUi.prototype.resizeImage=function(a,b,d,e,g,k){g=null!=g?g:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var h=Math.max(c/g,f/g);if(1<h){var m=Math.round(c/h),n=Math.round(f/h),l=document.createElement("canvas");l.width=m;l.height=n;l.getContext("2d").drawImage(a,0,0,m,n);var q=l.toDataURL();if(q.length<b.length){var p=document.createElement("canvas");p.width=m;p.height=n;var t=p.toDataURL();q!==t&&(b=q,c=m,f=n)}}}catch(H){}d(b,c,f)};
-EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var b=e,g=0;8>g;g++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[e]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,g){function c(a,b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>
+EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var b=d,g=0;8>g;g++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[d]=b;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,g){function c(a,b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(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 k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(c(a,4),"IHDR"!=c(a,4))null!=g&&g();else{c(a,17);g=a.substring(0,k);do{var m=f(a);if("IDAT"==c(a,4)){g=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);g+=h(d.length)+b+d+h(e^4294967295);
g+=a.substring(k-8,a.length);break}g+=a.substring(k-8,k-4+m);c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+
2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(t){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=
@@ -7061,23 +7061,23 @@ mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSet
mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,
null==mxSettings.settings.currentEdgeStyle?mxSettings.settings.currentEdgeStyle=Graph.prototype.defaultEdgeStyle:10>=mxSettings.settings.version&&(mxSettings.settings.currentEdgeStyle.orthogonalLoop=1,mxSettings.settings.currentEdgeStyle.jettySize="auto"),null==mxSettings.settings.currentVertexStyle&&(mxSettings.settings.currentVertexStyle=Graph.prototype.defaultVertexStyle),null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=
mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};
-("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,d,e){EditorUi.call(this,a,d,null!=e?e:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,e,d){EditorUi.call(this,a,e,null!=d?d:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,d,e){var b=null;try{b=window.open(a)}catch(l){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,d,e)).container,320,140,!0,!0):null!=d&&d()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.isOffline()||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");
this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(b){null!=window.console&&console.log("Plugin Error:",b,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";
App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="https://unpkg.com/dropbox@2.5.13/dist/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js","import":"/plugins/import.js",
replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js"};
-App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var d=document.cookie.split(";"),e=0;e<d.length;e++){var b=mxUtils.trim(d[e]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie="MODE=; expires="+d.toUTCString(),localStorage.setItem(".mode",a))}return a};
+App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),d=0;d<e.length;d++){var b=mxUtils.trim(e[d]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",a))}return a};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
-App.main=function(a,d){var e=null;EditorUi.enableLogging&&(window.onerror=function(a,b,d,g,k){try{if(a!=e&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){e=a;var c=new Image,f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(w){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height",
+App.main=function(a,e){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,e,g,k){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var c=new Image,f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+
+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(w){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height",
"0");b.setAttribute("src","offline.html");document.body.appendChild(b)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var b=mxSettings.getPlugins(),g=urlParams.p;App.initPluginCallback();if(null!=g){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var n=g.split(";"),g=0;g<n.length;g++){var l=App.pluginRegistry[n[g]];null!=l?mxscript(k+l):null!=window.console&&console.log("Unknown plugin:",n[g])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
null,null,null,mxClient.IS_SVG);if(null!=b&&0<b.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;n=!0;for(g=0;g<b.length&&n;g++)"/"!=b[g].charAt(0)&&b[g].substring(0,k.length)!=k&&(n=!1);if(n||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",[b.join("\n")]).replace(/\\n/g,
"\n")))for(g=0;g<b.length;g++)try{mxscript(b[g])}catch(p){}}}"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();
-mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=d?d():new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"===
+mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=e?e():new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"===
typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===
typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=
urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:",
@@ -7091,117 +7091,117 @@ 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.timeout=25E3;"1"!=urlParams.embed?App.prototype.menubarHeight=60:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};
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()}));
-if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var d=mxUtils.bind(this,function(){"undefined"!==
-typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var e=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
+if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){"undefined"!==
+typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();
this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==
-window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&
+window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&
(window.DrawDropboxClientCallback=b)});b()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();
null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",
IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
-App.prototype.checkLicense=function(){var a=this.drive.getUser(),d=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=d){var e=d.lastIndexOf("@"),b=d;0<=e&&(b=d.substring(e+1));mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(d)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var d=
+App.prototype.checkLicense=function(){var a=this.drive.getUser(),e=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=e){var d=e.lastIndexOf("@"),b=e;0<=d&&(b=e.substring(d+1));mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(e)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var d=
a.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,b)}}}catch(l){}}))}};
-App.prototype.handleLicense=function(a,d){var e=document.getElementById("geFooter"),b=null;if(null!=e&&null!=a)if(b=a.expiry,null!=a.footer)e.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var g=new Date(Date.parse(b)),k=Math.round((g-Date.now())/864E5);if(90>k){var n="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(d);e.style.height="100%";e.style.margin="0px";e.style.display=
-"";0>k?(this.footerHeight=80,e.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+n+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[d,g.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,e.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
-n+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[d,g.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)};
+App.prototype.handleLicense=function(a,e){var d=document.getElementById("geFooter"),b=null;if(null!=d&&null!=a)if(b=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var g=new Date(Date.parse(b)),k=Math.round((g-Date.now())/864E5);if(90>k){var n="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(e);d.style.height="100%";d.style.margin="0px";d.style.display=
+"";0>k?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+n+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[e,g.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
+n+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[e,g.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)};
App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
-App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var e=0;e<d.length;e++)d[e].id==a.id&&d.splice(e,1);null!=d&&(d.unshift(a),d=d.slice(0,5),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(d){}return null}};
-App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(d){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
+App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var d=0;d<e.length;d++)e[d].id==a.id&&e.splice(d,1);null!=e&&(e.unshift(a),e=e.slice(0,5),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(e){}return null}};
+App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.chromeless){if(a.constructor!=DriveFile&&a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var a=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],d,e=0;256>e;e++){d=e;for(var b=0;8>b;b++)d=d&1?3988292384^d>>>1:d>>>1;a[e]=d}return a};
-App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var d=-1,e=0;e<a.length;e++)d=d>>>8^this.crcTable[(d^a.charCodeAt(e))&255];return(d^-1)>>>0};
-App.prototype.getThumbnail=function(a,d){var e=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),g=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);d(a)}),a,this.thumbImageCache,"#ffffff",function(){d()},null,null,null,null,null,null,b),e=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),l=b.getGraphBounds(),p=a/l.width,p=Math.min(1,Math.min(3*a/(4*l.height),p)),c=Math.floor(l.x),f=Math.floor(l.y);n.setAttribute("width",Math.ceil(p*(l.width+4)));n.setAttribute("height",Math.ceil(p*(l.height+4)));var h=n.getContext("2d");
+App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var a=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=e&&(a=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],e,d=0;256>d;d++){e=d;for(var b=0;8>b;b++)e=e&1?3988292384^e>>>1:e>>>1;a[d]=e}return a};
+App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var e=-1,d=0;d<a.length;d++)e=e>>>8^this.crcTable[(e^a.charCodeAt(d))&255];return(e^-1)>>>0};
+App.prototype.getThumbnail=function(a,e){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),g=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
+function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},null,null,null,null,null,null,b),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),l=b.getGraphBounds(),p=a/l.width,p=Math.min(1,Math.min(3*a/(4*l.height),p)),c=Math.floor(l.x),f=Math.floor(l.y);n.setAttribute("width",Math.ceil(p*(l.width+4)));n.setAttribute("height",Math.ceil(p*(l.height+4)));var h=n.getContext("2d");
h.scale(p,p);h.translate(-c,-f);var q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";h.save();h.fillStyle=q;h.fillRect(c,f,Math.ceil(l.width+4),Math.ceil(l.height+4));h.restore();var t=new mxJsCanvas(n),u=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a,
-b){};w.drawState(b.getView().getState(b.model.root),u);u.finish(mxUtils.bind(this,function(){w.drawState(b.getView().getState(b.model.root),t);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);d(n)}));e=!0}}catch(x){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return e};
+b){};w.drawState(b.getView().getState(b.model.root),u);u.finish(mxUtils.bind(this,function(){w.drawState(b.getView().getState(b.model.root),t);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(n)}));d=!0}}catch(x){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return d};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
-(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,e){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(e)if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+d+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),d=null!=b?b.getMode():null,d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
-[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):d==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
-App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var d=this.getCurrentFile(),e=null!=d?d.getMode():null;e==App.MODE_GOOGLE?null!=d.desc&&null!=d.desc.mimeType?this.openLink("https://drive.google.com/drive/u/0/search?q=type:"+d.desc.mimeType+"&authuser=0"):null!=d.desc&&0<d.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+d.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):e==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):
-e==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):e==App.MODE_TRELLO?this.openLink("https://trello.com/"):e==App.MODE_GITHUB&&(null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};
+(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+e+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),e=null!=b?b.getMode():null,e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
+[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
+App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e.desc&&null!=e.desc.mimeType?this.openLink("https://drive.google.com/drive/u/0/search?q=type:"+e.desc.mimeType+"&authuser=0"):null!=e.desc&&0<e.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):
+d==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):d==App.MODE_TRELLO?this.openLink("https://trello.com/"):d==App.MODE_GITHUB&&(null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};
App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));return a};
-App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var d=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(d.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,d){this.spinner.stop();null==b&&(b=urlParams.title,d=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,d))}))}}catch(e){}};
-App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(d){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
+App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var e=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,e){this.spinner.stop();null==b&&(b=urlParams.title,e=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,e))}))}}catch(d){}};
+App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(e){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(a){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
-App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var d=document.createElement("div");d.className="geAlert";d.style.zIndex=2E9;d.style.left="50%";d.style.top="-100%";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
-mxResources.get("close"));a.innerHTML=mxResources.get("close");d.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(a))});document.body.appendChild(d);window.setTimeout(function(){d.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(d.style,"transition","all 2s ease");d.style.opacity="0";window.setTimeout(function(){null!=d.parentNode&&d.parentNode.removeChild(d)},2E3)},15E3)}};
+App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
+mxResources.get("close"));a.innerHTML=mxResources.get("close");e.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(a))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};
App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==b||this.loadFile(b,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):
this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var d=urlParams.create;null!=d?a(b[decodeURIComponent(d)]):(d=urlParams.data,null!=d?a(decodeURIComponent(d)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==
this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(c){}if(d)this.spinner.spin(document.body,mxResources.get("loading"));else if(d=this.getDiagramId(),"0"!=urlParams.splash||null!=d&&0!=d.length)this.loadFile(this.getDiagramId());else{var e=this.getDraft(),p=null!=e?e.data:this.getFileData(),d=Editor.useLocalStorage;this.createFile(this.defaultFilename,
-p,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=d&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
+p,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var e=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=e&&0<e.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
"title"]))}),b=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);var d=4>=a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,
-null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),d=decodeURIComponent(d);if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))try{null!=window.opener&&null!=window.opener[d]?b(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),e)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?
+null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),e=decodeURIComponent(e);if("http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8))try{null!=window.opener&&null!=window.opener[e]?b(window.opener[e]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(e,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?
(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(g){this.handleError(g)}};
-App.prototype.showSplash=function(a){var d=this.getServiceCount(!0,!0),e=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>d||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4==d?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();e()}),a);this.showDialog(b.container,3>a?260:300,4<=d?420:300,!0,!1);b.init()}else null==urlParams.create&&e()};
-App.prototype.addLanguageMenu=function(a,d){var e=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){e=document.createElement("div");e.setAttribute("title",mxResources.get("language"));e.className="geIcon geSprite geSprite-globe";e.style.position="absolute";e.style.cursor="pointer";e.style.bottom="20px";e.style.right="20px";if(d){e.style.direction="rtl";e.style.textAlign="right";e.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";
-b.style.fontSize="12px";b.style.margin="5px 24px 0 0";b.style.color="gray";mxUtils.write(b,mxResources.get("language"));e.appendChild(b)}mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxUtils.getOffset(e);
-b.popup(d.x,d.y+e.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(e)}return e};
+App.prototype.showSplash=function(a){var e=this.getServiceCount(!0,!0),d=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>e||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();d()}),a);this.showDialog(b.container,3>a?260:300,4<=e?420:300,!0,!1);b.init()}else null==urlParams.create&&d()};
+App.prototype.addLanguageMenu=function(a,e){var d=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(e){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";
+b.style.fontSize="12px";b.style.margin="5px 24px 0 0";b.style.color="gray";mxUtils.write(b,mxResources.get("language"));d.appendChild(b)}mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var e=mxUtils.getOffset(d);
+b.popup(e.x,e.y+d.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(d)}return d};
App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style=
gapi.drive.realtime.custom.collaborativeField("style"),mxRtCell.prototype.geometry=gapi.drive.realtime.custom.collaborativeField("geometry"),mxRtCell.prototype.visible=gapi.drive.realtime.custom.collaborativeField("visible"),mxRtCell.prototype.collapsed=gapi.drive.realtime.custom.collaborativeField("collapsed"),mxRtCell.prototype.connectable=gapi.drive.realtime.custom.collaborativeField("connectable"),mxRtCell.prototype.parent=gapi.drive.realtime.custom.collaborativeField("parent"),mxRtCell.prototype.children=
gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.source=gapi.drive.realtime.custom.collaborativeField("source"),mxRtCell.prototype.target=gapi.drive.realtime.custom.collaborativeField("target"))};mxRtCell=function(){};mxCodecRegistry.getCodec(mxCell).exclude.push("rtCell");mxCell.prototype.mxTransient.push("rtCell");
-App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var d=this.getPeerForMode(a);if(null!=d)d.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var e=
-Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,g=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;g.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k=
+App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(a);if(null!=e)e.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d=
+Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,g=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;g.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k=
document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&this.openFiles(k.files)}));k.click()}}};
-App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var d=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=d&&d.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&d.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var e=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
-new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=e;window.openFile=null})}else{var b=document.createElement("input");
+App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var e=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&e.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
+new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}else{var b=document.createElement("input");
b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files)for(var a=0;a<b.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(b.files[a])}));b.click()}};
-App.prototype.saveLibrary=function(a,d,e,b,g,k,n){b=null!=b?b:this.mode;g=null!=g?g:!1;k=null!=k?k:!1;var l=this.createLibraryDataFromImages(d),p=mxUtils.bind(this,function(a){this.spinner.stop();null!=n&&n();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==e&&b==App.MODE_DEVICE&&(e=new LocalLibrary(this,l,a));if(null==e)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-l,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,d)}),p,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,l,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,d)}),p)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){e.setData(l);var c=mxUtils.bind(this,
-function(){e.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(e,d);null!=n&&n()}),p)});if(a!=e.getTitle()){var f=e.getHash();e.rename(a,mxUtils.bind(this,function(a){e.constructor!=LocalLibrary&&f!=e.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(e.getHash()));this.removeLibrarySidebar(f);c()}),p)}else c()}};
-App.prototype.saveFile=function(a){var d=this.getCurrentFile();if(null!=d){var e=mxUtils.bind(this,function(){this.removeDraft();d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==d.getTitle()||null==this.mode){var b=null!=d.getTitle()?d.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var n=4>=a?2:6<a?4:3,b=new CreateDialog(this,
-b,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,e)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
-/(\.html)$/i.test(a)),null,b,e,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,e))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,n);this.showDialog(b.container,460,a>n?390:270,!0,!0);b.init()}else this.save(d.getTitle(),e)}};
-EditorUi.prototype.loadTemplate=function(a,d,e){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){d(a)}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
-200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&d(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),d(b))}),e,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,d,e,b,g,k,n,l){b=l?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var p=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){p();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(n=null!=this.stateArg?this.stateArg.folderId:n,this.drive.insertFile(a,d,n,mxUtils.bind(this,
-function(a){p();this.fileCreated(a,e,k,g)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,n):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c):
-b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){p();this.fileCreated(a,e,k,g)}),c,!1,n):b==App.MODE_BROWSER?(p(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,d,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,e,k,g)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(p(),this.fileCreated(new LocalFile(this,
-d,a,null==b),e,k,g))}};
-App.prototype.fileCreated=function(a,d,e,b){var g=window.location.pathname;null!=d&&0<d.length&&(g+="?libs="+d);g=this.getUrl(g);a.getMode()!=App.MODE_DEVICE&&(g+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,n=window.location.protocol+"//"+window.location.hostname+g,l=k,p=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(p=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(p.container),
-l=this.decodeNodeIntoGraph(l,p));a.setData(this.createFileData(k,p,a,n));null!=p&&p.container.parentNode.removeChild(p.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var f=this.getCurrentFile();null==e&&null!=f&&(e=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);e&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=d&&this.sidebar.showEntries(d)}),
-n=mxUtils.bind(this,function(){e||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==e||e?n():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=b&&b(),window.openWindow(g,null,n))});a.constructor==LocalFile||a.constructor==DriveFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
+App.prototype.saveLibrary=function(a,e,d,b,g,k,n){b=null!=b?b:this.mode;g=null!=g?g:!1;k=null!=k?k:!1;var l=this.createLibraryDataFromImages(e),p=mxUtils.bind(this,function(a){this.spinner.stop();null!=n&&n();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&b==App.MODE_DEVICE&&(d=new LocalLibrary(this,l,a));if(null==d)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+l,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),p,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),p,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),p,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),p,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,e)}),p,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,l,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,e)}),p)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(l);var c=mxUtils.bind(this,
+function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(d,e);null!=n&&n()}),p)});if(a!=d.getTitle()){var f=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(f);c()}),p)}else c()}};
+App.prototype.saveFile=function(a){var e=this.getCurrentFile();if(null!=e){var d=mxUtils.bind(this,function(){this.removeDraft();e.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==e.getTitle()||null==this.mode){var b=null!=e.getTitle()?e.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var n=4>=a?2:6<a?4:3,b=new CreateDialog(this,
+b,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
+/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,n);this.showDialog(b.container,460,a>n?390:270,!0,!0);b.init()}else this.save(e.getTitle(),d)}};
+EditorUi.prototype.loadTemplate=function(a,e,d){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){e(a)}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
+200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&e(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),e(b))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
+App.prototype.createFile=function(a,e,d,b,g,k,n,l){b=l?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var p=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){p();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(n=null!=this.stateArg?this.stateArg.folderId:n,this.drive.insertFile(a,e,n,mxUtils.bind(this,
+function(a){p();this.fileCreated(a,d,k,g)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,e,mxUtils.bind(this,function(a){p();this.fileCreated(a,d,k,g)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,e,mxUtils.bind(this,function(a){p();this.fileCreated(a,d,k,g)}),c,!1,n):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,e,mxUtils.bind(this,function(a){p();this.fileCreated(a,d,k,g)}),c):
+b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,e,mxUtils.bind(this,function(a){p();this.fileCreated(a,d,k,g)}),c,!1,n):b==App.MODE_BROWSER?(p(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,k,g)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(p(),this.fileCreated(new LocalFile(this,
+e,a,null==b),d,k,g))}};
+App.prototype.fileCreated=function(a,e,d,b){var g=window.location.pathname;null!=e&&0<e.length&&(g+="?libs="+e);g=this.getUrl(g);a.getMode()!=App.MODE_DEVICE&&(g+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,n=window.location.protocol+"//"+window.location.hostname+g,l=k,p=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(p=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(p.container),
+l=this.decodeNodeIntoGraph(l,p));a.setData(this.createFileData(k,p,a,n));null!=p&&p.container.parentNode.removeChild(p.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){c();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=e&&this.sidebar.showEntries(e)}),
+n=mxUtils.bind(this,function(){d||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==d||d?n():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=b&&b(),window.openWindow(g,null,n))});a.constructor==LocalFile||a.constructor==DriveFile?f():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
function(){f()}),mxUtils.bind(this,function(a){c();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,d,e){this.hideDialog();var b=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"),
-mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=e)this.spinner.stop(),this.fileLoaded(e);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),
-b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1));this.loadTemplate(g,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=g,h=g.lastIndexOf("."),k=e.lastIndexOf("/");h>k&&0<k&&(e=e.substring(k+1,h),h=g.substring(h),this.useCanvasForExport||
-".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(c=e+h)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+g.substring(31,g.lastIndexOf("&")),d),!0):!1}),!b()&&this.spinner.spin(document.body,
+App.prototype.loadFile=function(a,e,d){this.hideDialog();var b=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"),
+mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),
+b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1));this.loadTemplate(g,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var d=g,h=g.lastIndexOf("."),k=d.lastIndexOf("/");h>k&&0<k&&(d=d.substring(k+1,h),h=g.substring(h),this.useCanvasForExport||
+".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(c=d+h)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+g.substring(31,g.lastIndexOf("&")),e),!0):!1}),!b()&&this.spinner.spin(document.body,
mxResources.get("loading"))&&this.addListener("clientLoaded",b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)?b=this.oneDrive:"H"==a.charAt(0)?b=this.gitHub:"T"==a.charAt(0)&&(b=this.trello),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),
mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):
-window.location.hash=a.getHash()}))})))}),g=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=g&&(window.location.hash=g.getHash())}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null==a||0==a.length?k():null!=g&&g.isModified()&&!d?window.openWindow(this.getUrl()+"#"+a,null,k):k()};
-App.prototype.getLibraryStorageHint=function(a){var d=a.getTitle();a.constructor!=LocalLibrary&&(d+="\n"+a.getHash());a.constructor==DriveLibrary?d+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?d+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?d+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?d+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?d+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?d+=" ("+
-mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),d=mxUtils.bind(this,function(d,b){var e=0,k=[],n=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=b&&b()}});if(null!=d)for(var l=0;l<d.length;l++){var p=encodeURIComponent(decodeURIComponent(d[l]));mxUtils.bind(this,
+window.location.hash=a.getHash()}))})))}),g=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=g&&(window.location.hash=g.getHash())}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null==a||0==a.length?k():null!=g&&g.isModified()&&!e?window.openWindow(this.getUrl()+"#"+a,null,k):k()};
+App.prototype.getLibraryStorageHint=function(a){var e=a.getTitle();a.constructor!=LocalLibrary&&(e+="\n"+a.getHash());a.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?e+=" ("+
+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),e=mxUtils.bind(this,function(d,b){var e=0,k=[],n=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=b&&b()}});if(null!=d)for(var l=0;l<d.length;l++){var p=encodeURIComponent(decodeURIComponent(d[l]));mxUtils.bind(this,
function(b,d){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){e++;var c=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[d]=a;e--;n()}),g=mxUtils.bind(this,function(){a(b);e--;n()});this.pendingLibraries[b]=!0;var f=b.substring(0,1);if("L"==f)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
b&&(b=this.emptyLibraryXml);null!=b?c(new StorageLibrary(this,b,a)):g()}))}catch(y){g()}}),0);else if("U"==f){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){f=l;this.isCorsEnabledForUrl(f)||(f="t="+(new Date).getTime(),f=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+f);try{mxUtils.get(f,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{c(new UrlLibrary(this,a.getText(),l))}catch(y){g()}else g()}),function(){g()})}catch(x){g()}}}else{var p=null;"G"==f?null!=
this.drive&&null!=this.drive.user&&(p=this.drive):"H"==f?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==f?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==f?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==f&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{c(a)}catch(y){g()}}),function(a){g()}):(delete this.pendingLibraries[b],
-g())}}})(p,l)}n()});d(mxSettings.getCustomLibraries(),function(){d((urlParams.clibs||"").split(";"))})}};
+g())}}})(p,l)}n()});e(mxSettings.getCustomLibraries(),function(){e((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
this.shareButton=null)}};
-App.prototype.save=function(a,d){var e=this.getCurrentFile(),b=mxResources.get("saving");null!=e&&e.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=e&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==e&&(e.isModified()?e.isAutosave()||e.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
-d&&d()}),g=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==e.getTitle()?e.save(!0,b,g):e.saveAs(a,b,g)}};
-App.prototype.pickFolder=function(a,d,e){e=null!=e?e:!0;var b=this.spinner.pause();e&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var e=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(e=a.docs[0].id);d(e)}})):e&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,d(a))})):e&&a==App.MODE_GITHUB&&
-null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();d(a)})):e&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();d(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,d,e,b,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(d,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),e,b,!1):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,b):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,b?this.base64ToBlob(a,e):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_BROWSER&&(e=mxUtils.bind(this,function(){localStorage.setItem(d,a)}),null==localStorage.getItem(d)?
-e():this.confirm(mxResources.get("replaceIt",[d]),e))};
-App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var d=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
-""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var d=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),d,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
-App.prototype.showAuthDialog=function(a,d,e,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=e&&e(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(n){this.editor.setStatus(mxUtils.htmlEntities(n.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,d,e,b,g,k){var n=d;/\.svg$/i.test(n)||(n=n.substring(0,d.lastIndexOf("."))+b);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.vsdx$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",a,!0);l||(p.responseType="blob");p.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(p.responseText),a=this.base64ToBlob(a.content,
-"application/octet-stream")):a=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,n,!0))}),k)});p.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(d)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,n,!0)):g(new LocalFile(this,b,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,
-function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,n,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,n,!0))}catch(h){null!=k&&k(h)}});e=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||null!=e&&"image/"==e.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(d)?"data:image/png;base64,"+
-b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,e)}};
+App.prototype.save=function(a,e){var d=this.getCurrentFile(),b=mxResources.get("saving");null!=d&&d.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=d&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==d&&(d.isModified()?d.isAutosave()||d.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
+e&&e()}),g=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==d.getTitle()?d.save(!0,b,g):d.saveAs(a,b,g)}};
+App.prototype.pickFolder=function(a,e,d){d=null!=d?d:!0;var b=this.spinner.pause();d&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var d=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(d=a.docs[0].id);e(d)}})):d&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,e(a))})):d&&a==App.MODE_GITHUB&&
+null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):d&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(a,e,d,b,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
+mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),d,b,!1):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,a,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,b):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):g==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,a)}),null==localStorage.getItem(e)?
+d():this.confirm(mxResources.get("replaceIt",[e]),d))};
+App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
+""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var e=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),e,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
+App.prototype.showAuthDialog=function(a,e,d,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,e,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(n){this.editor.setStatus(mxUtils.htmlEntities(n.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(a,e,d,b,g,k){var n=e;/\.svg$/i.test(n)||(n=n.substring(0,e.lastIndexOf("."))+b);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.vsdx$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",a,!0);l||(p.responseType="blob");p.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(p.responseText),a=this.base64ToBlob(a.content,
+"application/octet-stream")):a=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,n,!0))}),k)});p.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(e)?(temp=this.extractGraphModelFromPng(b),null!=temp?g(new LocalFile(this,temp,n,!0)):g(new LocalFile(this,b,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,
+function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,n,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e):g(new LocalFile(this,b,n,!0))}catch(h){null!=k&&k(h)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||null!=d&&"image/"==d.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?"data:image/png;base64,"+
+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,d)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));
@@ -7209,10 +7209,10 @@ this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":
"javascript:void(0);");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(a){var b=this.getCurrentFile();null!=b&&b.isRenamable()&&this.actions.get("rename").funct();mxEvent.consume(a)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="29px",this.toolbar.container.style.paddingLeft="56px");this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("href","javascript:void(0);");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+
"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="5px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"26px":"10px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition=
-"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var d=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+
-"')"});this.addListener("formatWidthChanged",d);d();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding=
-"2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);var e=this.hsplitPosition,b=!1;"dark"==uiTheme&&
-(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?e:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top=
+"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+
+"')"});this.addListener("formatWidthChanged",e);e();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding=
+"2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);var d=this.hsplitPosition,b=!1;"dark"==uiTheme&&
+(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?d:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top=
"8px",this.fullscreenElement.style.top="8px");"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("href","javascript:void(0);"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",
this.toggleElement.style.top="5px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat","dark"==uiTheme&&(this.toggleElement.style.filter="invert(100%)"),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,
function(a){this.toggleCompactMode();mxEvent.consume(a)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}};
@@ -7233,68 +7233,68 @@ null!=this.gitHub&&d(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils
function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.trello.logout()}));b||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));document.body.appendChild(this.userPanel)}mxEvent.consume(a)})),
mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());
null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;";
-var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var d=Menus.prototype.init;Menus.prototype.init=function(){d.apply(this,
-arguments);var a=this.editorUi,e=a.editor.graph,k=mxUtils.bind(e,e.isEnabled),n=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),p=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
+var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var e=Menus.prototype.init;Menus.prototype.init=function(){e.apply(this,
+arguments);var a=this.editorUi,d=a.editor.graph,k=mxUtils.bind(d,d.isEnabled),n=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),p=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+
"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&
-a.exportSvg(b/100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),g=a.addCheckbox(b,
+a.exportSvg(b/100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,
mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),
!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,m,h,k,l){a.createHtml(b,c,d,e,f,g,m,h,k,l,mxUtils.bind(this,function(b,c){var d=
a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var d=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!e.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
-mxEvent.addListener(d,"change",function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!d.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){e.getSelectionCells();
-if(1==e.getSelectionCount()){var b=e.getSelectionCell(),c=e.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
+mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();
+if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),
mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+
"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(H){a.handleError(H)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-
1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+
"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var f=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=
-!a.isMathEnabled();e.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}isLocalStorage&&(f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var h=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&
-a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=e.getSelectionCells(),c=[],d=0;d<b.length;d++)e.getModel().isVertex(b[d])&&c.push(b[d]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var q="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 startStill startArrow startSize arcSize".split(" ");
-a.actions.addAction("copyStyle",function(){var b=e.view.getState(e.getSelectionCell());if(e.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=e.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var d=b[c],f=d.indexOf("=");if(0<=f){var g=d.substring(0,f),d=d.substring(f+1);null==a.copiedStyle[g]&&"none"==d&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(e.isEnabled()&&!e.isSelectionEmpty()&&
-null!=a.copiedStyle){e.getModel().beginUpdate();try{for(var b=e.getSelectionCells(),c=0;c<b.length;c++)for(var d=e.view.getState(b[c]),f=0;f<q.length;f++){var g=q[f],h=a.copiedStyle[g];d.style[g]!=h&&e.setCellStyles(g,h,[b[c]])}}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+!a.isMathEnabled();d.model.execute(b)});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.isMathEnabled()});f.isEnabled=k}isLocalStorage&&(f=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var h=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&
+a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var q="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 startStill startArrow startSize arcSize".split(" ");
+a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
+null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<q.length;f++){var g=q[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
function(b,c){a.downloadFile(c?"xmlpng":"png",null,null,b)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),
-null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){e.setShadowVisible(!e.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return e.shadowVisible});var t=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){t||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){t=!1}),t=!0)},null,null,"F1"));a.actions.addAction("userManual...",
+null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));f=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return d.shadowVisible});var t=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){t||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){t=!1}),t=!0)},null,null,"F1"));a.actions.addAction("userManual...",
function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP?a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):
a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});f=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",
function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));f=a.actions.addAction("find...",mxUtils.bind(this,function(){null==
this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=
this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=
d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),
-c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var d=b.addItem("Search:",null,null,c,null,
-null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
-window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));d.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support",
+c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search:",null,null,c,null,
+null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keypress",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length&&(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),this.editorUi.logEvent({category:"Help",action:"search",label:b}),
+window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0))}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support",
"-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);
this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],
-c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=e.getGraphBounds(),b=e.view.translate,d=e.view.scale;e.insertVertex(c,null,"",a.x/d-b.x,a.y/d-b.y,a.width/d,a.height/d,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){e.isSelectionEmpty()||(mxLog.show(),
-mxLog.debug("sb.createVertexTemplateFromData('"+e.compress(mxUtils.getXml(e.encodeCells(e.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=e.getGraphBounds(),c=e.view.scale,d=mxUtils.createXmlDocument(),f=d.createElement("output");d.appendChild(f);d=new mxXmlCanvas2D(f);
-d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var g=0,h=d.save;d.save=function(){g++;h.apply(this,arguments)};var m=d.restore;d.restore=function(){g--;m.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);k.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(e.getView().getState(e.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],
+c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),
+mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);
+e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var m=e.restore;e.restore=function(){g--;m.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);k.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],
c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),
this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,
arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",
function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",
-function(){a.getCurrentFile();if(e.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",
+function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",
b,function(b,c,d,e,f,g,h,m,k,l){a.createHtml(b,c,d,e,f,g,h,m,k,l,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");
d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=
/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));
a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=
-e.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-e.view.translate.y)/e.view.scale)+2,function(b,c,d,e,f,g,h,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(m){a.spinner.stop();m=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+k+';" src="'+a.createLink(b,c,d,e,f,g,m)+'"></iframe>');a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",
+d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,h,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(m){a.spinner.stop();m=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+k+';" src="'+a.createLink(b,c,d,e,f,g,m)+'"></iframe>');a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",
new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,
mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)f=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});f=a.actions.addAction("search",
-function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){e.isEditing()&&e.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var d=a.createLoadMessage("save");
-d.xml=c;b&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,
+function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");
+e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,
"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,
["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,
-this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,d){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var d=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
-c){e.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=d;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=k(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
-(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,d){var f=e.view,g=e.getGraphBounds(),h=e.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*e.gridSize)),k=e.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*e.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=
-!0,m=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,m,l){f=g?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/l)):1;a.importFile(b,c,h,k,Math.round(m*f),Math.round(l*f),d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,
-d,function(b){a.spinner.stop();e.setSelectionCells(b);e.scrollCellToVisible(e.getSelectionCell())})}),k=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},d):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
-null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},d):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
-d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){h(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},
-d)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);
+this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,e){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,
+c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=k(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&
+(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),h=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=
+!0,m=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,m,l){f=g?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/l)):1;a.importFile(b,c,h,k,Math.round(m*f),Math.round(l*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,
+e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),k=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},e):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},e,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},e);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){g(a.dropbox)},e):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},e):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
+e,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},e):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);b.addSeparator(e);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},e);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},e);a.isOffline()||(b.addSeparator(e),b.addItem(mxResources.get("url")+"...",null,function(){var b=
+new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){h(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},e));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},
+e)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);
d=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=
a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));
return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=function(){return this.enabled&&k.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=
@@ -7302,9 +7302,9 @@ App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(documen
function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,
function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=
this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var w="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText".split(" "),
-x=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},y=function(a,b,c,d){var f=e.isMouseInsertPoint()?e.getInsertPoint():e.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),d);a.vertex=!0;e.getModel().beginUpdate();try{a=e.addCell(a),e.fireEvent(new mxEventObject("cellsInserted",
-"cells",[a]))}finally{e.getModel().endUpdate()}e.container.focus();e.setSelectionCell(a);e.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&e.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
-y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
+x=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},y=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted",
+"cells",[a]))}finally{d.getModel().endUpdate()}d.container.focus();d.setSelectionCell(a);d.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+y("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<w.length;c++)"-"==w[c]?a.addSeparator(b):x(a,b,mxResources.get(w[c])+"...",w[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);
b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,d){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},d):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+
@@ -7323,58 +7323,58 @@ mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.ad
c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],
c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,
["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",
-b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var e=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,d){if(480>=screen.width&&a==this.get("help")){d.style.paddingRight=
-"0px";d.style.paddingLeft="0px";d.innerHTML="";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);d.appendChild(b)}e.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}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,d,e){this.ui=a;this.page=d;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(a,d,e){this.ui=a;this.oldIndex=d;this.newIndex=e}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,d){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,d=this.ui.editor,e=d.graph,b=d.graph.compress(e.zapGremlins(mxUtils.getXml(d.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=e.getViewState();a.root=e.model.root;e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.rootChanged(a.root);e.setViewState(a.viewState);
-d.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);d.updateGraphComponents();e.view.validate();e.sizeDidChange();this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,d,e,b){SelectPage.call(this,a,e);this.relatedPage=d;this.index=b;this.previousIndex=null}
+b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,e){if(480>=screen.width&&a==this.get("help")){e.style.paddingRight=
+"0px";e.style.paddingLeft="0px";e.innerHTML="";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);e.appendChild(b)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}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,e,d){this.ui=a;this.page=e;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(a,e,d){this.ui=a;this.oldIndex=e;this.newIndex=d}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,e){this.ui=a;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e))}
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,e=this.ui.editor,d=e.graph,b=e.graph.compress(d.zapGremlins(mxUtils.getXml(e.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=d.getViewState();a.root=d.model.root;d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.rootChanged(a.root);d.setViewState(a.viewState);
+e.fireEvent(new mxEventObject("setViewState","change",this));d.gridEnabled=d.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);e.updateGraphComponents();d.view.validate();d.sizeDidChange();this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,e,d,b){SelectPage.call(this,a,d);this.relatedPage=e;this.index=b;this.previousIndex=null}
mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
-EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var d=0;d<this.pages.length;d++)if(this.pages[d].getId()==a)return this.pages[d];return null};
-EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,d=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(a.view,arguments)});var e=!1,b=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var d=this.currentPage;null!=d&&d!=b&&(null==d.viewState||null==d.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
-a.view.translate.x*a.view.scale+d.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+d.viewState.scrollTop),b=d);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===typeof Editor.MathJaxClear||
-this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),e=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),g=a.getAttribute("pageHeight"),k=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
-a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=g?new mxRectangle(0,0,parseFloat(b),parseFloat(g)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
+EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==a)return this.pages[e];return null};
+EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,e=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(a.view,arguments)});var d=!1,b=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var e=this.currentPage;null!=e&&e!=b&&(null==e.viewState||null==e.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
+a.view.translate.x*a.view.scale+e.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+e.viewState.scrollTop),b=e);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=!0}))):"undefined"===typeof Editor.MathJaxClear||
+this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var e=a.getAttribute("page"),d=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),g=a.getAttribute("pageHeight"),k=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
+a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=g?new mxRectangle(0,0,parseFloat(b),parseFloat(g)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteXml,this.pasteCounter=a.pasteCounter||0,this.mathEnabled=a.mathEnabled,this.gridEnabled=a.gridEnabled,this.gridSize=a.gridSize,this.graphHandler.guidesEnabled=a.guidesEnabled,this.foldingEnabled=a.foldingEnabled,this.setShadowVisible(a.shadowVisible,!1),this.scrollbars=a.scrollbars,this.pageVisible=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
a.pageFormat,this.view.scale=a.scale,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=
mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.background=this.defaultGraphBackground,this.backgroundImage=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize=
-this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var d=this.editor.extractGraphModel(a.node);if(null!=d){a.graphModelNode=d;a.viewState=this.editor.graph.createViewState(d);var e=new mxCodec(d.ownerDocument);a.root=e.decode(d).root}else a.root=this.editor.graph.model.createRoot()}return a};
-EditorUi.prototype.selectPage=function(a,d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();e.add(b);e.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))};
-EditorUi.prototype.selectNextPage=function(a){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),a?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,d){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();d=null!=d?d:this.pages.length;var e=new ChangePage(this,a,a,d);this.editor.graph.model.execute(e)}return a};
-EditorUi.prototype.createPage=function(a){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));d.setName(null!=a?a:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var a={},d=0;d<this.pages.length;d++){var e=this.pages[d].getName();null!=e&&0<e.length&&(a[e]=e)}d=this.pages.length;do e=mxResources.get("pageWithNumber",[++d]);while(null!=a[e]);return e};
-EditorUi.prototype.removePage=function(a){var d=this.editor.graph;if(d.isEnabled()){d.model.beginUpdate();try{var e=this.currentPage;if(e==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;e=this.pages[b]}else e=this.insertPage(),d.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1])));d.model.execute(new ChangePage(this,a,e))}finally{d.model.endUpdate()}}return a};
-EditorUi.prototype.duplicatePage=function(a,d){var e=this.editor.graph,b=null;e.isEnabled()&&(e.isEditing()&&e.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=e.cloneCells([e.model.root])[0],b.viewState=e.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(d),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
-EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return a};EditorUi.prototype.movePage=function(a,d){this.editor.graph.model.execute(new MovePage(this,a,d))};
+this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var e=this.editor.extractGraphModel(a.node);if(null!=e){a.graphModelNode=e;a.viewState=this.editor.graph.createViewState(e);var d=new mxCodec(e.ownerDocument);a.root=d.decode(e).root}else a.root=this.editor.graph.model.createRoot()}return a};
+EditorUi.prototype.selectPage=function(a,e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();d.add(b);d.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))};
+EditorUi.prototype.selectNextPage=function(a){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),a?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,e){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();e=null!=e?e:this.pages.length;var d=new ChangePage(this,a,a,e);this.editor.graph.model.execute(d)}return a};
+EditorUi.prototype.createPage=function(a){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},e=0;e<this.pages.length;e++){var d=this.pages[e].getName();null!=d&&0<d.length&&(a[d]=d)}e=this.pages.length;do d=mxResources.get("pageWithNumber",[++e]);while(null!=a[d]);return d};
+EditorUi.prototype.removePage=function(a){var e=this.editor.graph;if(e.isEnabled()){e.model.beginUpdate();try{var d=this.currentPage;if(d==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;d=this.pages[b]}else d=this.insertPage(),e.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1])));e.model.execute(new ChangePage(this,a,d))}finally{e.model.endUpdate()}}return a};
+EditorUi.prototype.duplicatePage=function(a,e){var d=this.editor.graph,b=null;d.isEnabled()&&(d.isEditing()&&d.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=d.cloneCells([d.model.root])[0],b.viewState=d.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(e),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
+EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return a};EditorUi.prototype.movePage=function(a,e){this.editor.graph.model.execute(new MovePage(this,a,e))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="12px";d.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),g=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,e){this.pages[b]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(e,
-"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));d.appendChild(e)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(d);
-b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(d.clientWidth>this.tabContainer.clientWidth-e){null!=b&&(b.style.position="absolute",b.style.right="0px",d.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var l=this.createControlTab(4,
-"&nbsp;&#10095;");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var p=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=p+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){d.scrollLeft-=Math.max(20,p-20);mxUtils.setOpacity(n,0<d.scrollLeft?100:50);mxUtils.setOpacity(l,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
-0<d.scrollLeft?100:50);mxUtils.setOpacity(l,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){d.scrollLeft+=Math.max(20,p-20);mxUtils.setOpacity(n,0<d.scrollLeft?100:50);mxUtils.setOpacity(l,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(a){var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="8px 4px 8px 4px";d.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";d.style.borderBottomStyle="solid";d.style.backgroundColor=this.tabContainer.style.backgroundColor;
-d.style.cursor="default";d.style.color="gray";a&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(d.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return d};
-EditorUi.prototype.createControlTab=function(a,d){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=d;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="12px";e.style.marginLeft="30px";for(var d=this.editor.chromeless?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+d)/this.pages.length)+1),g=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(d,
+"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));e.appendChild(d)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);
+b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=b&&(b.style.position="absolute",b.style.right="0px",e.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var l=this.createControlTab(4,
+"&nbsp;&#10095;");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var p=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=p+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){e.scrollLeft-=Math.max(20,p-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(l,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
+0<e.scrollLeft?100:50);mxUtils.setOpacity(l,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){e.scrollLeft+=Math.max(20,p-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(l,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(a){var e=document.createElement("div");e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="8px 4px 8px 4px";e.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";e.style.borderBottomStyle="solid";e.style.backgroundColor=this.tabContainer.style.backgroundColor;
+e.style.cursor="default";e.style.color="gray";a&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(e.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return e};
+EditorUi.prototype.createControlTab=function(a,e){var d=this.createTab(!0);d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=e;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,
function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),g=mxEvent.getClientY(a);d.popup(b,g,null,a);this.setCurrentMenu(d);
+null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),e=mxEvent.getClientY(a);d.popup(b,e,null,a);this.setCurrentMenu(d);
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,d,e){e=this.createTab(e);var b=a.getName();e.setAttribute("title",b);mxUtils.write(e,b);e.style.maxWidth=d+"px";e.style.width=d+"px";this.addTabListeners(a,e);42<d&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var e=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,g=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(d){b=null!=this.currentMenu;g=a==this.currentPage;e.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(k)&&g||mxEvent.isPopupTrigger(k))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!b){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var l=mxEvent.getClientX(k),p=mxEvent.getClientY(k);n.popup(l,p,null,k);this.setCurrentMenu(n,d)}mxEvent.consume(k)}}))};
-EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(e,b){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);e.addSeparator(b);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
-mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,b){b.setAttribute("page",e.page.getId());return b};a.beforeDecode=function(a,e,b){b.ui=a.ui;return e};a.afterDecode=function(a,e,b){b.page=a.ui.getPageById(e.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,b){b.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(b.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,b));return b};a.beforeDecode=function(a,e,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(e.getAttribute("relatedPage"));if(null==b.relatedPage){var d=document.createElement("diagram");d.setAttribute("id",e.getAttribute("relatedPage"));
-d.setAttribute("name",e.getAttribute("name"));b.relatedPage=new DiagramPage(d);e=e.cloneNode(!0);d=e.firstChild;if(null!=d)for(b.relatedPage.root=a.decodeCell(d,!1),b=d.nextSibling,d.parentNode.removeChild(d),d=b;null!=d;){b=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var k=d.getAttribute("id");null==a.lookup(k)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=b}}return e};a.afterDecode=function(a,e,b){b.index=b.previousIndex;return b};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",d=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,b,e,l,p){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),n=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[g],
-a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=c;e=d.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b="tree"==(null!=b?b.style:u.getCellStyle(a)).containerType);
+EditorUi.prototype.createTabForPage=function(a,e,d){d=this.createTab(d);var b=a.getName();d.setAttribute("title",b);mxUtils.write(d,b);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(a,d);42<e&&(d.style.textOverflow="ellipsis");return d};
+EditorUi.prototype.addTabListeners=function(a,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,g=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){b=null!=this.currentMenu;g=a==this.currentPage;d.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(k)&&g||mxEvent.isPopupTrigger(k))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!b){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var l=mxEvent.getClientX(k),p=mxEvent.getClientY(k);n.popup(l,p,null,k);this.setCurrentMenu(n,e)}mxEvent.consume(k)}}))};
+EditorUi.prototype.createPageMenu=function(a,e){return mxUtils.bind(this,function(d,b){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,e)}),b);d.addSeparator(b);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
+mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,b){b.setAttribute("page",d.page.getId());return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.page=a.ui.getPageById(d.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,b){b.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(b.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,b));return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(d.getAttribute("relatedPage"));if(null==b.relatedPage){var e=document.createElement("diagram");e.setAttribute("id",d.getAttribute("relatedPage"));
+e.setAttribute("name",d.getAttribute("name"));b.relatedPage=new DiagramPage(e);d=d.cloneNode(!0);e=d.firstChild;if(null!=e)for(b.relatedPage.root=a.decodeCell(e,!1),b=e.nextSibling,e.parentNode.removeChild(e),e=b;null!=e;){b=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==a.lookup(k)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=b}}return d};a.afterDecode=function(a,d,b){b.index=b.previousIndex;return b};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",e=Graph.prototype.foldCells;
+Graph.prototype.foldCells=function(a,b,d,l,p){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),n=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[g],
+a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);d=c;d=e.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b="tree"==(null!=b?b.style:u.getCellStyle(a)).containerType);
return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b=null!=(null!=b?b.style:u.getCellStyle(a)).childLayout);return b}function l(a){a=u.view.getState(a);if(null!=a){var b=u.getIncomingEdges(a.cell);if(0<b.length&&(b=u.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 p(a,b){b=null!=b?b:!0;u.model.beginUpdate();try{var c=u.model.getParent(a),d=u.getIncomingEdges(a),e=u.cloneCells([d[0],a]);u.model.setTerminal(e[0],u.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);u.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=u.view.getState(a),k=u.view.scale;if(null!=h){var n=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=u.getOutgoingEdges(u.model.getTerminal(d[0],
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index e18c0c7c..a7668ee5 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -6936,9 +6936,17 @@ var PluginsDialog = function(editorUi)
for (var i = 0; i < tokens.length; i++)
{
- if (tokens[i].length > 0 && mxUtils.indexOf(plugins, tokens[i]) < 0)
+ 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(tokens[i]);
+ plugins.push(token);
}
}
diff --git a/src/main/webapp/js/diagramly/ElectronApp.js b/src/main/webapp/js/diagramly/ElectronApp.js
index 122942db..2563a045 100644
--- a/src/main/webapp/js/diagramly/ElectronApp.js
+++ b/src/main/webapp/js/diagramly/ElectronApp.js
@@ -107,23 +107,8 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email';
this.addLinkToItem(item, 'https://desk.draw.io/support/solutions/articles/16000032875');
}
- this.addMenuItems(menu, ['autosave', '-', 'createShape', 'editDiagram', '-'], parent);
-
- var item = this.addMenuItem(menu, 'plugins', parent);
-
- if (!editorUi.isOffline())
- {
- this.addLinkToItem(item, 'https://desk.draw.io/support/solutions/articles/16000056430');
- }
-
- var item = this.addMenuItem(menu, 'tags', parent);
-
- if (!editorUi.isOffline())
- {
- this.addLinkToItem(item, 'https://desk.draw.io/support/solutions/articles/16000046966');
- }
-
- this.addMenuItems(menu, ['-', 'online'], parent);
+ this.addMenuItems(menu, ['autosave', '-', 'createShape', 'editDiagram', '-',
+ 'plugins', 'tags', '-', 'online'], parent);
})));
};
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index 80988675..583b6ac9 100644
--- a/src/main/webapp/js/embed-static.min.js
+++ b/src/main/webapp/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.4.6",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.4.7",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -1680,42 +1680,42 @@ e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),thi
if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-
b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null==this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b)}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-
-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&(mxEvent.isLeftMouseButton(h)&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(g.openLink(this.currentLink,e?g.linkTarget:"_top"),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<
-f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};
-g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};
-Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
-!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==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.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||
-c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};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){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 h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",
-mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=
-e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,v,q){var r=this.state;if(null!=this.foAltText&&(0==d||0!=r.fontSize&&f.length<5*d/r.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",Math.round((e+r.fontSize)/2));t.setAttribute("fill",r.fontColor||"black");t.setAttribute("text-anchor",
-"middle");t.setAttribute("font-size",Math.round(r.fontSize)+"px");t.setAttribute("font-family",r.fontFamily);(r.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(r.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(r.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration","underline");try{return n.innerHTML=f,t.textContent=n.value,t}catch(ha){return p.apply(this,
-arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var v=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=
-function(a){return new mxSvgCanvas2D(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,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=
-window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};
-Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;
-if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){b=null!=b?b:a;var c=document.createElement("a");c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",
-a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);40<b.length&&(b=b.substring(0,26)+"..."+b.substring(b.length-10));mxUtils.write(c,b);return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&
-null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),
-c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));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,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(I){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||
-!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.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 h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}h.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
-mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,
-h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=
-g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);
-mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";
-this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,
-b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
-this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<
-this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",
-k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
+g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,
+h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=
+e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];
+e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};
+Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==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.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=
+this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};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){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 h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+
+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform",
+"translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,v,q){var r=this.state;if(null!=this.foAltText&&(0==d||0!=r.fontSize&&f.length<5*d/r.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",
+Math.round((e+r.fontSize)/2));t.setAttribute("fill",r.fontColor||"black");t.setAttribute("text-anchor","middle");t.setAttribute("font-size",Math.round(r.fontSize)+"px");t.setAttribute("font-family",r.fontFamily);(r.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(r.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(r.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration",
+"underline");try{return n.innerHTML=f,t.textContent=n.value,t}catch(ha){return p.apply(this,arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var v=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),
+l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(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,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=
+function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};
+Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&
+c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){b=null!=b?b:a;var c=document.createElement("a");
+c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);40<b.length&&(b=b.substring(0,26)+"..."+b.substring(b.length-10));mxUtils.write(c,b);return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
+function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,
+f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&
+this.isCellSelected(e.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));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,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(I){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=
+c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.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 h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=
+a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}h.apply(this,arguments);
+mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=
+f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
+var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+
+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=mxCellEditor.prototype.resize;
+mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,
+mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*
+c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow=
+"",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
function(){try{this.graph.container.focus()}catch(v){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],
!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var n=mxGraphHandler.prototype.moveCells;
diff --git a/src/main/webapp/js/mxgraph/Actions.js b/src/main/webapp/js/mxgraph/Actions.js
index 1ab0e5d7..b1c0c5d6 100644
--- a/src/main/webapp/js/mxgraph/Actions.js
+++ b/src/main/webapp/js/mxgraph/Actions.js
@@ -25,7 +25,7 @@ Actions.prototype.init = function()
};
// File actions
- this.addAction('new...', function() { graph.openLink(ui.getUrl()); });
+ this.addAction('new...', function() { window.open(ui.getUrl()); });
this.addAction('open...', function()
{
window.openNew = true;
@@ -291,14 +291,14 @@ Actions.prototype.init = function()
ui.showDialog(dlg.container, 320, 200, true, true);
dlg.init();
}
- }, null, null, 'Alt+Shift+T');
+ });
this.addAction('openLink', function()
{
var link = graph.getLinkForCell(graph.getSelectionCell());
if (link != null)
{
- graph.openLink(link);
+ window.open(link);
}
});
this.addAction('editLink...', function()
@@ -316,7 +316,7 @@ Actions.prototype.init = function()
graph.setLinkForCell(cell, (link.length > 0) ? link : null);
});
}
- }, null, null, 'Alt+Shift+L');
+ });
this.addAction('insertLink...', function()
{
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
@@ -755,7 +755,7 @@ Actions.prototype.init = function()
ext = '_' + mxClient.language;
}
- graph.openLink(RESOURCES_PATH + '/help' + ext + '.html');
+ window.open(RESOURCES_PATH + '/help' + ext + '.html');
});
var showingAbout = false;
diff --git a/src/main/webapp/js/mxgraph/Dialogs.js b/src/main/webapp/js/mxgraph/Dialogs.js
index 091a446e..131cd258 100644
--- a/src/main/webapp/js/mxgraph/Dialogs.js
+++ b/src/main/webapp/js/mxgraph/Dialogs.js
@@ -520,7 +520,7 @@ var FilenameDialog = function(editorUi, filename, buttonText, fn, label, validat
{
var helpBtn = mxUtils.button(mxResources.get('help'), function()
{
- editorUi.editor.graph.openLink(helpLink);
+ window.open(helpLink);
});
helpBtn.className = 'geBtn';
@@ -780,7 +780,7 @@ var EditDiagramDialog = function(editorUi)
});
window.openFile.setData(data, null);
- editorUi.editor.graph.openLink(editorUi.getUrl());
+ window.open(editorUi.getUrl());
}
else if (select.value == 'replace')
{
@@ -1948,7 +1948,7 @@ var LayersWindow = function(editorUi, x, y, w, h)
var tbarHeight = (!EditorUi.compactUi) ? '30px' : '26px';
var listDiv = document.createElement('div')
- listDiv.style.backgroundColor = (Dialog.backdropColor == 'white') ? '#dcdcdc' : '#e5e5e5';
+ listDiv.style.backgroundColor = (Dialog.backdropColor == 'white') ? '#a2a2a2' : '#e5e5e5';
listDiv.style.position = 'absolute';
listDiv.style.overflow = 'auto';
listDiv.style.left = '0px';
@@ -2457,7 +2457,7 @@ var LayersWindow = function(editorUi, x, y, w, h)
});
this.window = new mxWindow(mxResources.get('layers'), div, x, y, w, h, true, true);
- this.window.minimumSize = new mxRectangle(0, 0, 120, 120);
+ this.window.minimumSize = new mxRectangle(0, 0, 90, 90);
this.window.destroyOnClose = false;
this.window.setMaximizable(false);
this.window.setResizable(true);
diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js
index 5547d9de..42064f80 100644
--- a/src/main/webapp/js/mxgraph/Editor.js
+++ b/src/main/webapp/js/mxgraph/Editor.js
@@ -312,12 +312,12 @@ Editor.prototype.editAsNew = function(xml, title)
}));
}
- this.editorWindow = this.graph.openLink(this.getEditBlankUrl(p +
+ this.editorWindow = window.open(this.getEditBlankUrl(p +
((p.length > 0) ? '&' : '?') + 'client=1'));
}
else
{
- this.editorWindow = this.graph.openLink(this.getEditBlankUrl(p) +
+ this.editorWindow = window.open(this.getEditBlankUrl(p) +
'#R' + encodeURIComponent(xml));
}
}
diff --git a/src/main/webapp/js/mxgraph/EditorUi.js b/src/main/webapp/js/mxgraph/EditorUi.js
index d0400ded..5466456d 100644
--- a/src/main/webapp/js/mxgraph/EditorUi.js
+++ b/src/main/webapp/js/mxgraph/EditorUi.js
@@ -1321,6 +1321,8 @@ EditorUi.prototype.initClipboard = function()
*/
EditorUi.prototype.initCanvas = function()
{
+ var graph = this.editor.graph;
+
// Initial page layout view, scrollBuffer and timer-based scrolling
var graph = this.editor.graph;
graph.timerAutoScroll = true;
@@ -1715,7 +1717,7 @@ EditorUi.prototype.initCanvas = function()
}
else
{
- graph.openLink(this.editor.editButtonLink, 'editWindow');
+ window.open(this.editor.editButtonLink, 'editWindow');
}
mxEvent.consume(evt);
@@ -2007,7 +2009,8 @@ EditorUi.prototype.initCanvas = function()
{
// Ctrl+wheel (or pinch on touchpad) is a native browser zoom event is OS X
// LATER: Add support for zoom via pinch on trackpad for Chrome in OS X
- if ((this.dialogs == null || this.dialogs.length == 0) && graph.isZoomWheelEvent(evt))
+ if ((mxEvent.isAltDown(evt) || (mxEvent.isControlDown(evt) && !mxClient.IS_MAC) ||
+ graph.panningHandler.isActive()) && (this.dialogs == null || this.dialogs.length == 0))
{
var source = mxEvent.getSource(evt);
@@ -3005,10 +3008,6 @@ EditorUi.prototype.createDivs = function()
{
this.tabContainer = this.createTabContainer();
}
- else
- {
- this.diagramContainer.style.border = 'none';
- }
};
/**
@@ -3865,9 +3864,7 @@ EditorUi.prototype.createKeyHandler = function(editor)
// Alt+Shift+Keycode mapping to action
var altShiftActions = {67: this.actions.get('clearWaypoints'), // Alt+Shift+C
65: this.actions.get('connectionArrows'), // Alt+Shift+A
- 76: this.actions.get('editLink'), // Alt+Shift+L
- 80: this.actions.get('connectionPoints'), // Alt+Shift+P
- 84: this.actions.get('editTooltip') // Alt+Shift+T
+ 80: this.actions.get('connectionPoints') // Alt+Shift+P
};
mxKeyHandler.prototype.getFunction = function(evt)
diff --git a/src/main/webapp/js/mxgraph/Format.js b/src/main/webapp/js/mxgraph/Format.js
index 165bd17e..f7ae5c75 100644
--- a/src/main/webapp/js/mxgraph/Format.js
+++ b/src/main/webapp/js/mxgraph/Format.js
@@ -256,9 +256,8 @@ Format.prototype.isRoundedState = function(state)
Format.prototype.isLineJumpState = function(state)
{
var shape = mxUtils.getValue(state.style, mxConstants.STYLE_SHAPE, null);
- var curved = mxUtils.getValue(state.style, mxConstants.STYLE_CURVED, false);
- return !curved && (shape == 'connector' || shape == 'filledEdge');
+ return shape == 'connector' || shape == 'filledEdge';
};
/**
@@ -889,6 +888,8 @@ BaseFormatPanel.prototype.createOption = function(label, isCheckedFn, setChecked
apply(cb.checked);
}
+
+ mxEvent.consume(evt);
});
apply(value);
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index a6492800..6810d5f5 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -621,15 +621,13 @@ Graph = function(container, model, renderHint, stylesheet, themes)
return mxEvent.isMouseEvent(me.getEvent());
};
- // Handles links if graph is read-only or cell is locked
+ // Enables links if graph is "disabled" (ie. read-only)
var click = this.click;
this.click = function(me)
{
- var locked = me.state == null && me.sourceState != null && this.isCellLocked(me.sourceState.cell);
-
- if ((!this.isEnabled() || locked) && !me.isConsumed())
+ if (!this.isEnabled() && !me.isConsumed())
{
- var cell = (locked) ? me.sourceState.cell : me.getCell();
+ var cell = me.getCell();
if (cell != null)
{
@@ -637,14 +635,7 @@ Graph = function(container, model, renderHint, stylesheet, themes)
if (link != null)
{
- if (this.isPageLink(link))
- {
- this.pageLinkClicked(cell, link);
- }
- else
- {
- this.openLink(link);
- }
+ window.open(link);
}
}
}
@@ -653,28 +644,13 @@ Graph = function(container, model, renderHint, stylesheet, themes)
return click.apply(this, arguments);
}
};
-
- // Redirects tooltips for locked cells
- this.tooltipHandler.getStateForEvent = function(me)
- {
- return me.sourceState;
- };
-
- // Redirects cursor for locked cells
- var getCursorForMouseEvent = this.getCursorForMouseEvent;
- this.getCursorForMouseEvent = function(me)
- {
- var locked = me.state == null && me.sourceState != null && this.isCellLocked(me.sourceState.cell);
-
- return this.getCursorForCell((locked) ? me.sourceState.cell : me.getCell());
- };
// Shows pointer cursor for clickable cells with links
// ie. if the graph is disabled and cells cannot be selected
var getCursorForCell = this.getCursorForCell;
this.getCursorForCell = function(cell)
{
- if (!this.isEnabled() || this.isCellLocked(cell))
+ if (!this.isEnabled())
{
var link = this.getLinkForCell(cell);
@@ -682,13 +658,11 @@ Graph = function(container, model, renderHint, stylesheet, themes)
{
return 'pointer';
}
- else if (this.isCellLocked(cell))
- {
- return 'default';
- }
}
-
- return getCursorForCell.apply(this, arguments);
+ else
+ {
+ return getCursorForCell.apply(this, arguments);
+ }
};
// Changes rubberband selection to be recursive
@@ -878,7 +852,7 @@ Graph = function(container, model, renderHint, stylesheet, themes)
{
me = graphUpdateMouseEvent.apply(this, arguments);
- if (me.state != null && this.isCellLocked(me.getCell()))
+ if (this.isCellLocked(me.getCell()))
{
me.state = null;
}
@@ -1095,77 +1069,53 @@ Graph.prototype.init = function(container)
};
/**
- * Installs automatic layout via styles
+ * Adds support for page links.
*/
-Graph.prototype.labelLinkClicked = function(state, elt, evt)
+Graph.prototype.isPageLink = function(href)
{
- var href = elt.getAttribute('href');
-
- if (href != null && !this.isPageLink(href) && (mxEvent.isLeftMouseButton(evt) &&
- !mxEvent.isPopupTrigger(evt)) || mxEvent.isTouchEvent(evt))
- {
- if (!this.isEnabled() || this.isCellLocked(state.cell))
- {
- var target = this.isBlankLink(href) ? this.linkTarget : '_top';
- this.openLink(this.getAbsoluteUrl(href), target);
- }
-
- mxEvent.consume(evt);
- }
+ return false;
};
/**
- * Returns the size of the page format scaled with the page size.
+ * Installs automatic layout via styles
*/
-Graph.prototype.openLink = function(href, target)
+Graph.prototype.labelLinkClicked = function(state, elt, evt)
{
- var result = window;
+ var href = elt.getAttribute('href');
- // Workaround for blocking in same iframe
- if (target == '_self' && window != window.top)
- {
- window.location.href = href;
- }
- else
+ if (href != null && !this.isPageLink(href))
{
- // Avoids page reload for anchors (workaround for IE but used everywhere)
- if (href.substring(0, this.baseUrl.length) == this.baseUrl &&
- href.charAt(this.baseUrl.length) == '#' &&
- target == '_top' && window == window.top)
+ if (!this.isEnabled())
{
- var hash = href.split('#')[1];
-
- // Forces navigation if on same hash
- if (window.location.hash == '#' + hash)
+ var target = state.view.graph.isBlankLink(href) ?
+ state.view.graph.linkTarget : '_top';
+ href = state.view.graph.getAbsoluteUrl(href);
+
+ // Workaround for blocking in same iframe
+ if (target == '_self' && window != window.top)
{
- window.location.hash = '';
+ window.location.href = href;
+ }
+ else
+ {
+ // Avoids page reload for anchors (workaround for IE but used everywhere)
+ if (href.substring(0, this.baseUrl.length) == this.baseUrl &&
+ href.charAt(this.baseUrl.length) == '#' &&
+ target == '_top' && window == window.top)
+ {
+ window.location.hash = href.split('#')[1];
+ }
+ else if ((mxEvent.isLeftMouseButton(evt) &&
+ !mxEvent.isPopupTrigger(evt)) ||
+ mxEvent.isTouchEvent(evt))
+ {
+ window.open(href, target);
+ }
}
-
- window.location.hash = hash;
- }
- else
- {
- result = window.open(href, target);
}
+
+ mxEvent.consume(evt);
}
-
- return result;
-};
-
-/**
- * Adds support for page links.
- */
-Graph.prototype.isPageLink = function(href)
-{
- return false;
-};
-
-/**
- * Adds support for page links.
- */
-Graph.prototype.pageLinkClicked = function(cell, href)
-{
- this.fireEvent(new mxEventObject('pageLinkClicked', 'cell', cell, 'href', href));
};
/**
@@ -1362,17 +1312,6 @@ Graph.prototype.isReplacePlaceholders = function(cell)
};
/**
- * Returns true if the given mouse wheel event should be used for zooming. This
- * is invoked if no dialogs are showing and returns true if Alt or Control
- * (except macOS) is pressed or if the panning handler is active.
- */
-Graph.prototype.isZoomWheelEvent = function(evt)
-{
- return mxEvent.isAltDown(evt) || (mxEvent.isControlDown(evt) && !mxClient.IS_MAC) ||
- (this.panningHandler != null && this.panningHandler.isActive());
-};
-
-/**
* Adds Alt+click to select cells behind cells.
*/
Graph.prototype.isTransparentClickEvent = function(evt)
@@ -3583,7 +3522,7 @@ HoverIcons.prototype.setCurrentState = function(state)
var state2 = this.validEdges[e];
var pts2 = state2.absolutePoints;
- if (pts2 != null && mxUtils.intersects(state, state2) && state2.style['noJump'] != '1')
+ if (pts2 != null && mxUtils.intersects(state, state2))
{
// Compares each segment of the edge with the current segment
for (var j = 0; j < pts2.length - 1; j++)
@@ -5256,157 +5195,178 @@ if (typeof mxVertexHandler != 'undefined')
scrollTop: 0,
updateCurrentState: function(me)
{
- var tmp = me.sourceState;
+ var tmp = graph.view.getState(me.getCell());
if (tmp != this.currentState)
{
- if (this.currentState != null)
- {
- this.clear();
- }
-
- this.currentState = tmp;
-
- if (this.currentState != null)
- {
- this.activate(this.currentState);
- }
+ if (this.currentState != null)
+ {
+ this.clear();
+ }
+
+ this.currentState = tmp;
+
+ if (this.currentState != null)
+ {
+ this.activate(this.currentState);
+ }
}
},
mouseDown: function(sender, me)
{
- this.startX = me.getGraphX();
- this.startY = me.getGraphY();
- this.scrollLeft = graph.container.scrollLeft;
- this.scrollTop = graph.container.scrollTop;
-
- if (this.currentLink == null && graph.container.style.overflow == 'auto')
- {
- graph.container.style.cursor = 'move';
- }
-
- this.updateCurrentState(me);
+ this.startX = me.getGraphX();
+ this.startY = me.getGraphY();
+ this.scrollLeft = graph.container.scrollLeft;
+ this.scrollTop = graph.container.scrollTop;
+
+ if (this.currentLink == null && graph.container.style.overflow == 'auto')
+ {
+ graph.container.style.cursor = 'move';
+ }
+
+ this.updateCurrentState(me);
},
mouseMove: function(sender, me)
{
- if (graph.isMouseDown)
- {
- if (this.currentLink != null)
- {
- var dx = Math.abs(this.startX - me.getGraphX());
- var dy = Math.abs(this.startY - me.getGraphY());
-
- if (dx > tol || dy > tol)
- {
- this.clear();
- }
- }
- }
- else
- {
- // Checks for parent link
- var linkNode = me.getSource();
+ if (graph.isMouseDown)
+ {
+ if (this.currentLink != null)
+ {
+ var dx = Math.abs(this.startX - me.getGraphX());
+ var dy = Math.abs(this.startY - me.getGraphY());
- while (linkNode != null && linkNode.nodeName.toLowerCase() != 'a')
+ if (dx > tol || dy > tol)
{
- linkNode = linkNode.parentNode;
+ this.clear();
}
-
- if (linkNode != null)
- {
- this.clear();
- }
- else
- {
- if (this.currentState != null && (me.getState() == this.currentState || me.sourceState == null) &&
- graph.intersects(this.currentState, me.getGraphX(), me.getGraphY()))
- {
- return;
- }
-
- this.updateCurrentState(me);
- }
- }
- },
- mouseUp: function(sender, me)
- {
- var source = me.getSource();
- var evt = me.getEvent();
-
+ }
+ }
+ else
+ {
// Checks for parent link
- var linkNode = source;
+ var linkNode = me.getSource();
while (linkNode != null && linkNode.nodeName.toLowerCase() != 'a')
{
linkNode = linkNode.parentNode;
}
- // Ignores clicks on links and collapse/expand icon
- if (linkNode == null &&
- (((Math.abs(this.scrollLeft - graph.container.scrollLeft) < tol &&
- Math.abs(this.scrollTop - graph.container.scrollTop) < tol) &&
- (me.sourceState == null || !me.isSource(me.sourceState.control))) &&
- ((mxEvent.isLeftMouseButton(evt) &&
- !mxEvent.isPopupTrigger(evt)) ||
- mxEvent.isTouchEvent(evt))))
- {
- if (this.currentLink != null)
+ if (linkNode != null)
+ {
+ this.clear();
+ }
+ else
+ {
+ if (this.currentState != null && (me.getState() == this.currentState || me.getState() == null) &&
+ graph.intersects(this.currentState, me.getGraphX(), me.getGraphY()))
{
- var blank = graph.isBlankLink(this.currentLink);
+ return;
+ }
+
+ this.updateCurrentState(me);
+ }
+ }
+ },
+ mouseUp: function(sender, me)
+ {
+
+ var source = me.getSource();
+ var evt = me.getEvent();
+
+ // Checks for parent link
+ var linkNode = source;
+
+ while (linkNode != null && linkNode.nodeName.toLowerCase() != 'a')
+ {
+ linkNode = linkNode.parentNode;
+ }
+
+ // Ignores clicks on links and collapse/expand icon
+ if (linkNode == null &&
+ (((Math.abs(this.scrollLeft - graph.container.scrollLeft) < tol &&
+ Math.abs(this.scrollTop - graph.container.scrollTop) < tol) &&
+ (me.getState() == null || !me.isSource(me.getState().control))) &&
+ ((mxEvent.isLeftMouseButton(evt) &&
+ !mxEvent.isPopupTrigger(evt)) ||
+ mxEvent.isTouchEvent(evt))))
+ {
+ if (this.currentLink != null)
+ {
+ var blank = graph.isBlankLink(this.currentLink);
+
+ if ((this.currentLink.substring(0, 5) === 'data:' ||
+ !blank) && beforeClick != null)
+ {
+ beforeClick(evt, this.currentLink);
+ }
+
+ if (!mxEvent.isConsumed(evt))
+ {
+ var target = (blank) ? graph.linkTarget : '_top';
- if ((this.currentLink.substring(0, 5) === 'data:' ||
- !blank) && beforeClick != null)
- {
- beforeClick(evt, this.currentLink);
- }
+ // Workaround for blocking in same iframe
+ if (target == '_self' && window != window.top)
+ {
+ window.location.href = this.currentLink;
+ }
+ else
+ {
+ // Avoids page reload for anchors (workaround for IE but used everywhere)
+ if (this.currentLink.substring(0, graph.baseUrl.length) == graph.baseUrl &&
+ this.currentLink.charAt(graph.baseUrl.length) == '#' &&
+ target == '_top' && window == window.top)
+ {
+ window.location.hash = this.currentLink.split('#')[1];
+ }
+ else
+ {
+ window.open(this.currentLink, target);
+ }
+ }
- if (!mxEvent.isConsumed(evt))
- {
- var target = (blank) ? graph.linkTarget : '_top';
- graph.openLink(this.currentLink, target);
- me.consume();
- }
- }
- else if (onClick != null && !me.isConsumed() &&
- (Math.abs(this.scrollLeft - graph.container.scrollLeft) < tol &&
- Math.abs(this.scrollTop - graph.container.scrollTop) < tol) &&
- (Math.abs(this.startX - me.getGraphX()) < tol &&
- Math.abs(this.startY - me.getGraphY()) < tol))
- {
- onClick(me.getEvent());
+ me.consume();
}
}
-
- this.clear();
+ else if (onClick != null && !me.isConsumed() &&
+ (Math.abs(this.scrollLeft - graph.container.scrollLeft) < tol &&
+ Math.abs(this.scrollTop - graph.container.scrollTop) < tol) &&
+ (Math.abs(this.startX - me.getGraphX()) < tol &&
+ Math.abs(this.startY - me.getGraphY()) < tol))
+ {
+ onClick(me.getEvent());
+ }
+ }
+
+ this.clear();
},
activate: function(state)
{
- this.currentLink = graph.getAbsoluteUrl(graph.getLinkForCell(state.cell));
-
- if (this.currentLink != null)
- {
- graph.container.style.cursor = 'pointer';
-
- if (this.highlight != null)
- {
- this.highlight.highlight(state);
- }
+ this.currentLink = graph.getAbsoluteUrl(graph.getLinkForCell(state.cell));
+
+ if (this.currentLink != null)
+ {
+ graph.container.style.cursor = 'pointer';
+
+ if (this.highlight != null)
+ {
+ this.highlight.highlight(state);
+ }
}
},
clear: function()
{
- if (graph.container != null)
- {
- graph.container.style.cursor = cursor;
- }
-
- this.currentState = null;
- this.currentLink = null;
-
- if (this.highlight != null)
- {
- this.highlight.hide();
- }
+ if (graph.container != null)
+ {
+ graph.container.style.cursor = cursor;
+ }
+
+ this.currentState = null;
+ this.currentLink = null;
+
+ if (this.highlight != null)
+ {
+ this.highlight.hide();
+ }
}
};
@@ -5442,7 +5402,7 @@ if (typeof mxVertexHandler != 'undefined')
for (var i = 0; i < cells.length; i++)
{
var parent = model.getParent(cells[i]);
- var child = this.moveCells([clones[i]], s, s, false)[0];
+ var child = this.moveCells([clones[i]], s, s, false, parent)[0];
select.push(child);
if (append)
@@ -5451,7 +5411,7 @@ if (typeof mxVertexHandler != 'undefined')
}
else
{
- // Maintains child index by inserting after clone in parent
+ // Maintains child index by inserting after cloned in parent
var index = parent.getIndex(cells[i]);
model.add(parent, clones[i], index + 1);
}
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index 431ef5b0..6359083b 100644
--- a/src/main/webapp/js/reader.min.js
+++ b/src/main/webapp/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.4.6",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.4.7",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -1680,42 +1680,42 @@ e.y;this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),thi
if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-
b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null==this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b)}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-
-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&(mxEvent.isLeftMouseButton(h)&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(g.openLink(this.currentLink,e?g.linkTarget:"_top"),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<
-f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};
-g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};
-Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
-!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==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.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||
-c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};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){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 h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",
-mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=
-e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,v,q){var r=this.state;if(null!=this.foAltText&&(0==d||0!=r.fontSize&&f.length<5*d/r.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",Math.round((e+r.fontSize)/2));t.setAttribute("fill",r.fontColor||"black");t.setAttribute("text-anchor",
-"middle");t.setAttribute("font-size",Math.round(r.fontSize)+"px");t.setAttribute("font-family",r.fontFamily);(r.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(r.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(r.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration","underline");try{return n.innerHTML=f,t.textContent=n.value,t}catch(ha){return p.apply(this,
-arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var v=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=
-function(a){return new mxSvgCanvas2D(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,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=
-window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};
-Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;
-if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){b=null!=b?b:a;var c=document.createElement("a");c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",
-a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);40<b.length&&(b=b.substring(0,26)+"..."+b.substring(b.length-10));mxUtils.write(c,b);return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&
-null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),
-c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));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,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(I){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||
-!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.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 h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}h.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
-mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,
-h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=
-g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);
-mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";
-this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,
-b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
-this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<
-this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",
-k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
+g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,
+h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=
+e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];
+e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};
+Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==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.encodeCells=function(a){for(var b=this.cloneCells(a),c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=
+this.view.getState(a[d]);if(null!=e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};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){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 h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+
+a));null==l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform",
+"translate(0.5,0.5)"),d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=document.createElement("textarea"),p=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,v,q){var r=this.state;if(null!=this.foAltText&&(0==d||0!=r.fontSize&&f.length<5*d/r.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",
+Math.round((e+r.fontSize)/2));t.setAttribute("fill",r.fontColor||"black");t.setAttribute("text-anchor","middle");t.setAttribute("font-size",Math.round(r.fontSize)+"px");t.setAttribute("font-family",r.fontFamily);(r.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(r.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&t.setAttribute("font-style","italic");(r.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration",
+"underline");try{return n.innerHTML=f,t.textContent=n.value,t}catch(ha){return p.apply(this,arguments)}}else return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var v=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),
+l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(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,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=
+function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};
+Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&
+c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){b=null!=b?b:a;var c=document.createElement("a");
+c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",a);null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);40<b.length&&(b=b.substring(0,26)+"..."+b.substring(b.length-10));mxUtils.write(c,b);return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
+function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,
+f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&
+this.isCellSelected(e.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));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,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(I){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=
+c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.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 h=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=
+a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}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)}h.apply(this,arguments);
+mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=
+f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
+var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+
+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var k=mxCellEditor.prototype.resize;
+mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,
+mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*
+c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow=
+"",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
function(){try{this.graph.container.focus()}catch(v){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],
!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var n=mxGraphHandler.prototype.moveCells;
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index a6683c21..7a85eaf1 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -2332,42 +2332,42 @@ f.y;this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),thi
if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,g=this.getTolerance(),e=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(e,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=a.sourceState;
a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=e.container.scrollLeft;this.scrollTop=e.container.scrollTop;null==this.currentLink&&"auto"==e.container.style.overflow&&(e.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(e.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-
d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>g||c>g)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!e.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d)}},mouseUp:function(a,c){for(var f=c.getSource(),h=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-
-e.container.scrollLeft)<g&&Math.abs(this.scrollTop-e.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&(mxEvent.isLeftMouseButton(h)&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(f=e.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(h,this.currentLink),mxEvent.isConsumed(h)||(e.openLink(this.currentLink,f?e.linkTarget:"_top"),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-e.container.scrollLeft)<
-g&&Math.abs(this.scrollTop-e.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=e.getAbsoluteUrl(e.getLinkForCell(a.cell));null!=this.currentLink&&(e.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=e.container&&(e.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};
-e.click=function(a){};e.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var g=this.cloneCells(a,!1),e=0;e<a.length;e++){var h=b.getParent(a[e]),p=this.moveCells([g[e]],c,c,!1)[0];f.push(p);if(d)b.add(h,g[e]);else{var n=h.getIndex(a[e]);b.add(h,g[e],n+1)}}}finally{b.endUpdate()}return f};
-Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],g=0;g<c.length;g++)f.push(c[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=f[g-1]){a[g].setAttribute("width",d);a[g].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",
-!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var b=[],c=null,f=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var e=this.view.getState(d[g]);
-if(null!=e){var h=a?e.getCenterX():e.getCenterY(),c=null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;b.push(e)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});e=this.view.translate;h=this.view.scale;f=f/h-(a?e.x:e.y);c=c/h-(a?e.x:e.y);this.getModel().beginUpdate();try{for(var p=(c-f)/(b.length-1),c=f,g=1;g<b.length-1;g++){var n=this.view.getState(this.model.getParent(b[g].cell)),r=this.getCellGeometry(b[g].cell),c=c+p;null!=r&&null!=n&&(r=r.clone(),a?r.x=Math.round(c-r.width/2)-n.origin.x:
-r.y=Math.round(c-r.height/2)-n.origin.y,this.getModel().setGeometry(b[g].cell,r))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=this.view.getState(a[c]);if(null!=f){var g=this.getCellGeometry(d[c]);null==g||!g.relative||this.model.isEdge(a[c])||
-b.get(this.model.getParent(a[c]))||(g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;g=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(g,d[c]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,d,b,c,f,g,e){d=null!=d?d:1;b=null!=b?b:0;f=
-null!=f?f:!0;g=null!=g?g:!0;e=null!=e?e:!0;var h=g||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,n=mxUtils.createXmlDocument();c=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=c.style?c.style.backgroundColor=a:c.setAttribute("style","background-color:"+a));null==n.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",
-mxConstants.NS_XLINK)):c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/p;c.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*b)+"px");c.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*b)+"px");c.setAttribute("version","1.1");var r=c;f&&(r=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),r.setAttribute("transform","translate(0.5,0.5)"),c.appendChild(r));n.appendChild(c);n=this.createSvgCanvas(r);n.foOffset=
-f?-.5:0;n.textOffset=f?-.5:0;n.imageOffset=f?-.5:0;n.translate(Math.floor((b/d-h.x)/p),Math.floor((b/d-h.y)/p));var u=document.createElement("textarea"),x=n.createAlternateContent;n.createAlternateContent=function(a,d,b,c,f,g,e,h,n,p,r,k,q){var w=this.state;if(null!=this.foAltText&&(0==c||0!=w.fontSize&&g.length<5*c/w.fontSize)){var y=this.createElement("text");y.setAttribute("x",Math.round(c/2));y.setAttribute("y",Math.round((f+w.fontSize)/2));y.setAttribute("fill",w.fontColor||"black");y.setAttribute("text-anchor",
-"middle");y.setAttribute("font-size",Math.round(w.fontSize)+"px");y.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&y.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&y.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&y.setAttribute("text-decoration","underline");try{return u.innerHTML=g,y.textContent=u.value,y}catch(ga){return x.apply(this,
-arguments)}}else return x.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=p/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(h,f)&&n.image(d.x,d.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=e;e=this.createSvgImageExport();var k=e.drawCellState;e.drawCellState=function(a,d){(g||a.view.graph.isCellSelected(a.cell))&&k.apply(this,arguments)};e.drawState(this.getView().getState(this.model.root),n);return c};Graph.prototype.createSvgCanvas=
-function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d=
-window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),f=0;f<c;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};
-Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;
-if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,d){d=null!=d?d:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",
-a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<d.length&&(d=d.substring(0,26)+"..."+d.substring(d.length-10));mxUtils.write(b,d);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&
-null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,g,e){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),d=this.isCellSelected(g.getCell()),
-b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}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 d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(S){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||
-!mxEvent.isAltDown(a.getEvent())?m.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var l=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){l.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&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 q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}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)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||
-mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,
-h.length-1));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,e=(mxUtils.getValue(a.style,
-mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;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)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=
-e?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);
-mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;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)+"px";this.textarea.style.textDecoration="";
-this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,
-d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
-this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<
-this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",
-t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
+e.container.scrollLeft)<g&&Math.abs(this.scrollTop-e.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(f=e.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":f?e.linkTarget:"_top",e.openLink(this.currentLink,
+h),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-e.container.scrollLeft)<g&&Math.abs(this.scrollTop-e.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=e.getAbsoluteUrl(e.getLinkForCell(a.cell));null!=this.currentLink&&(e.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=e.container&&(e.container.style.cursor=
+f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}};e.click=function(a){};e.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var g=this.cloneCells(a,!1),e=0;e<a.length;e++){var h=b.getParent(a[e]),p=this.moveCells([g[e]],c,c,!1)[0];
+f.push(p);if(d)b.add(h,g[e]);else{var n=h.getIndex(a[e]);b.add(h,g[e],n+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],g=0;g<c.length;g++)f.push(c[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=f[g-1]){a[g].setAttribute("width",d);a[g].setAttribute("height",b);break}}};
+Graph.prototype.insertLink=function(a){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());
+if(null!=d&&1<d.length){for(var b=[],c=null,f=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var e=this.view.getState(d[g]);if(null!=e){var h=a?e.getCenterX():e.getCenterY(),c=null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;b.push(e)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});e=this.view.translate;h=this.view.scale;f=f/h-(a?e.x:e.y);c=c/h-(a?e.x:e.y);this.getModel().beginUpdate();try{for(var p=(c-f)/(b.length-1),c=f,g=1;g<b.length-1;g++){var n=this.view.getState(this.model.getParent(b[g].cell)),
+r=this.getCellGeometry(b[g].cell),c=c+p;null!=r&&null!=n&&(r=r.clone(),a?r.x=Math.round(c-r.width/2)-n.origin.x:r.y=Math.round(c-r.height/2)-n.origin.y,this.getModel().setGeometry(b[g].cell,r))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=
+this.view.getState(a[c]);if(null!=f){var g=this.getCellGeometry(d[c]);null==g||!g.relative||this.model.isEdge(a[c])||b.get(this.model.getParent(a[c]))||(g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;g=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(g,d[c]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});
+return a};Graph.prototype.getSvg=function(a,d,b,c,f,g,e){d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;g=null!=g?g:!0;e=null!=e?e:!0;var h=g||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,n=mxUtils.createXmlDocument();c=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=c.style?c.style.backgroundColor=a:c.setAttribute("style","background-color:"+
+a));null==n.createElementNS?(c.setAttribute("xmlns",mxConstants.NS_SVG),c.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/p;c.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*b)+"px");c.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*b)+"px");c.setAttribute("version","1.1");var r=c;f&&(r=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),r.setAttribute("transform",
+"translate(0.5,0.5)"),c.appendChild(r));n.appendChild(c);n=this.createSvgCanvas(r);n.foOffset=f?-.5:0;n.textOffset=f?-.5:0;n.imageOffset=f?-.5:0;n.translate(Math.floor((b/d-h.x)/p),Math.floor((b/d-h.y)/p));var u=document.createElement("textarea"),x=n.createAlternateContent;n.createAlternateContent=function(a,d,b,c,f,g,e,h,n,p,r,k,q){var w=this.state;if(null!=this.foAltText&&(0==c||0!=w.fontSize&&g.length<5*c/w.fontSize)){var y=this.createElement("text");y.setAttribute("x",Math.round(c/2));y.setAttribute("y",
+Math.round((f+w.fontSize)/2));y.setAttribute("fill",w.fontColor||"black");y.setAttribute("text-anchor","middle");y.setAttribute("font-size",Math.round(w.fontSize)+"px");y.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&y.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&y.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&y.setAttribute("text-decoration",
+"underline");try{return u.innerHTML=g,y.textContent=u.value,y}catch(ga){return x.apply(this,arguments)}}else return x.apply(this,arguments)};b=this.backgroundImage;null!=b&&(f=p/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(h,f)&&n.image(d.x,d.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=e;e=this.createSvgImageExport();var k=e.drawCellState;e.drawCellState=function(a,d){(g||a.view.graph.isCellSelected(a.cell))&&k.apply(this,arguments)};e.drawState(this.getView().getState(this.model.root),
+n);return c};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=
+function(a){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),f=0;f<c;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};
+Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&
+b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,d){d=null!=d?d:a;var b=document.createElement("a");
+b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);40<d.length&&(d=d.substring(0,26)+"..."+d.substring(d.length-10));mxUtils.write(b,d);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
+function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,
+g,e){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),d=this.isCellSelected(g.getCell()),b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&
+this.isCellSelected(f.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.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}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 d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(S){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var m=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?m.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var l=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){l.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=
+b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&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 q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=
+a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}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)}q.apply(this,arguments);
+mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"<br/>"):h,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD,e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;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)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=
+g?"bold":"normal";this.textarea.style.fontStyle=e?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
+var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;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)+
+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;
+mxCellEditor.prototype.resize=function(a,d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,
+mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*
+b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow=
+"",t.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=
function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var d=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
function(){try{this.graph.container.focus()}catch(J){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell],
!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var g=mxGraphHandler.prototype.moveCells;
diff --git a/src/main/webapp/plugins/voice.js b/src/main/webapp/plugins/voice.js
index 9b9ac952..d2c0383a 100644
--- a/src/main/webapp/plugins/voice.js
+++ b/src/main/webapp/plugins/voice.js
@@ -410,29 +410,34 @@ Draw.loadPlugin(function(ui) {
function getBestWord(str1, words, useLevenshteinDist)
{
+ if (words == null || words.length == 0)
+ {
+ return str1;
+ }
+
useLevenshteinDist = (useLevenshteinDist != null) ? useLevenshteinDist : true;
var bestWord = words[0];
var minDist = ((useLevenshteinDist) ? levenshteinDist(str1, bestWord) :
- naiveHammingDistance(str1, bestWord));
+ naiveHammingDistance(str1, bestWord));
for (var i = 1; i < words.length; i++)
{
- var tmp = ((useLevenshteinDist) ? levenshteinDist(str1, words[i]) :
- ((str1 == words[i]) ? 0 : naiveHammingDistance(str1, words[i])));
-
- if (tmp < minDist || (tmp == minDist &&
- str1.length > bestWord.length &&
- bestWord.length < words[i].length))
- {
- bestWord = words[i];
- minDist = tmp;
- }
-
- if (bestWord == str1)
- {
- break;
- }
+ var tmp = ((useLevenshteinDist) ? levenshteinDist(str1, words[i]) :
+ ((str1 == words[i]) ? 0 : naiveHammingDistance(str1, words[i])));
+
+ if (tmp < minDist || (tmp == minDist &&
+ str1.length > bestWord.length &&
+ bestWord.length < words[i].length))
+ {
+ bestWord = words[i];
+ minDist = tmp;
+ }
+
+ if (bestWord == str1)
+ {
+ break;
+ }
}
return bestWord;
@@ -1734,7 +1739,7 @@ Draw.loadPlugin(function(ui) {
{
shapeList = [];
- for (var tmp in mxCellRenderer.prototype.defaultShapes)
+ for (var tmp in mxCellRenderer.defaultShapes)
{
shapeList.push(tmp.toLowerCase());
}
@@ -1776,11 +1781,11 @@ Draw.loadPlugin(function(ui) {
App.say('No cell for {1}', [shape]);
}
else if (vertices.length == 0)
- {
+ {
App.say('Connections ignored');
- }
+ }
else
- {
+ {
// LATER: Add perimeter style etc
graph.setCellStyles(mxConstants.STYLE_SHAPE, shapenameToken, vertices);
ui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_SHAPE],
@@ -1788,7 +1793,7 @@ Draw.loadPlugin(function(ui) {
// Terminate
return true;
- }
+ }
}
// Lazy creation of cache for action names