From e6e5b0495ebdb800ad16a9c4dc57218928e82c89 Mon Sep 17 00:00:00 2001
From: Gaudenz Alder <gaudenz@jgraph.com>
Date: Thu, 30 Apr 2020 16:31:48 +0200
Subject: [PATCH] 13.0.4 release

---
 ChangeLog                                     |    8 +
 VERSION                                       |    2 +-
 etc/mxgraph/mxClient.js                       |   37 +-
 src/main/webapp/connect/confluence/admin.js   |   27 +-
 .../connect/confluence/lucidMassImport.html   |    6 +-
 .../webapp/connect/confluence/support.html    |   16 +-
 src/main/webapp/js/app.min.js                 | 1209 +++++++++--------
 src/main/webapp/js/diagramly/App.js           |   63 +-
 src/main/webapp/js/diagramly/Dialogs.js       |    2 +-
 src/main/webapp/js/diagramly/EditorUi.js      |   25 +-
 src/main/webapp/js/diagramly/Extensions.js    |    9 +-
 src/main/webapp/js/diagramly/GitLabClient.js  |   11 +-
 src/main/webapp/js/extensions.min.js          |  126 +-
 src/main/webapp/js/mxgraph/Graph.js           |    2 +-
 src/main/webapp/js/mxgraph/Init.js            |    2 +-
 src/main/webapp/js/viewer.min.js              |  862 ++++++------
 src/main/webapp/service-worker.js             |    4 +-
 17 files changed, 1223 insertions(+), 1188 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4e4e98c1d..ac2fa8e7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+30-APR-2020: 13.0.4
+
+- Adds support for vss(x) via clibs parameter
+- Fixes inserting file to empty GitLab repo
+- Fixes drop vss file into library dialog
+- Fixes event handling for iPadOS 13.4.1
+- Uses mxGraph 4.1.2 beta 5
+
 29-APR-2020: 13.0.3
 
 - Lucidchart import improvements
diff --git a/VERSION b/VERSION
index a027b7851..b04feae78 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-13.0.3
\ No newline at end of file
+13.0.4
\ No newline at end of file
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index 7589b93a0..2b98dfb51 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -1,11 +1,10 @@
 var mxClient={VERSION:"4.1.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&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:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&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:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IOS_VERSION:function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);if(null!=a&&0<a.length)return parseInt(a[1])}return 0}(),IS_GC:/Google Inc/.test(navigator.vendor),
-IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_CHROMEOS:/\bCrOS\b/.test(navigator.appVersion),
-IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf("Mac")),IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c,d){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="UTF-8" type="text/css"/>');else{var e=c.createElement("link");e.setAttribute("rel",
-a);e.setAttribute("href",b);e.setAttribute("charset","UTF-8");e.setAttribute("type","text/css");d&&e.setAttribute("id",d);c.getElementsByTagName("head")[0].appendChild(e)}},loadResources:function(a,b){function c(){0==--d&&a()}for(var d=mxClient.defaultBundles.length,e=0;e<mxClient.defaultBundles.length;e++)mxResources.add(mxClient.defaultBundles[e],b,c)},include:function(a){document.write('<script src="'+a+'">\x3c/script>')}};
-mxClient.IS_SF&&mxClient.IS_TOUCH&&!mxClient.IS_IOS&&(mxClient.IOS_VERSION=13,mxClient.IOS=!0);"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1);"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);
+0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=
+navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_CHROMEOS:/\bCrOS\b/.test(navigator.appVersion),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf("Mac")),IS_LOCAL:0>document.location.href.indexOf("http://")&&
+0>document.location.href.indexOf("https://"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c,d){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="UTF-8" type="text/css"/>');else{var e=c.createElement("link");e.setAttribute("rel",a);e.setAttribute("href",b);e.setAttribute("charset","UTF-8");e.setAttribute("type","text/css");d&&e.setAttribute("id",d);c.getElementsByTagName("head")[0].appendChild(e)}},loadResources:function(a,
+b){function c(){0==--d&&a()}for(var d=mxClient.defaultBundles.length,e=0;e<mxClient.defaultBundles.length;e++)mxResources.add(mxClient.defaultBundles[e],b,c)},include:function(a){document.write('<script src="'+a+'">\x3c/script>')}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1);"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);
 "undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";
 mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
 mxClient.IS_VML&&(mxClient.IS_SVG?mxClient.IS_VML=!1:(null!=document.namespaces&&(8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"))),mxClient.IS_QUIRKS&&30<=document.styleSheets.length?
@@ -245,7 +244,7 @@ mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){
 mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e))for(d=this.graph.getModel().getChildCount(a),e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)};
 mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
 mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
-mxImageBundle.prototype.images=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;
+mxImageBundle.prototype.alt=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;
 mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawCellState.apply(this,arguments)})),this.includeOverlays&&this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawOverlays.apply(this,arguments)})))};
 mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.getLinkForCellState=function(a,b){return null};mxImageExport.prototype.drawCellState=function(a,b){var c=this.getLinkForCellState(a,b);null!=c&&b.setLink(c);this.drawShape(a,b);this.drawText(a,b);null!=c&&b.setLink(null)};
 mxImageExport.prototype.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),a.shape.paint(b),b.restore())};mxImageExport.prototype.drawText=function(a,b){null!=a.text&&a.text.checkBounds()&&(b.save(),a.text.paint(b),b.restore())};mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(a,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}
@@ -384,10 +383,10 @@ function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=nul
 mxGuide.prototype.getGuideTolerance=function(a){return a&&this.graph.gridEnabled?this.graph.gridSize/2:this.tolerance};mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};mxGuide.prototype.isStateIgnored=function(a){return!1};
 mxGuide.prototype.move=function(a,b,c,d){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){d=function(c,d,e){var f=!1;e&&Math.abs(c-z)<t?(b.y=c-a.getCenterY(),t=Math.abs(c-z),f=!0):e||(Math.abs(c-B)<t?(b.y=c-a.y,t=Math.abs(c-B),f=!0):Math.abs(c-A)<t&&(b.y=c-a.y-a.height,t=Math.abs(c-A),f=!0));f&&(p=d,q=c,null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=
 !1,this.guideY.init(this.graph.getView().getOverlayPane())));n=n||f};var e=function(c,d,e){var f=!1;e&&Math.abs(c-y)<r?(b.x=c-a.getCenterX(),r=Math.abs(c-y),f=!0):e||(Math.abs(c-u)<r?(b.x=c-a.x,r=Math.abs(c-u),f=!0):Math.abs(c-x)<r&&(b.x=c-a.x-a.width,r=Math.abs(c-x),f=!0));f&&(l=d,m=c,null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));
-k=k||f};this.graph.getView();var f=this.graph.getView().scale,f=this.getGuideTolerance(c)*f,g=a.clone();g.x+=b.x;g.y+=b.y;for(var k=!1,l=null,m=null,n=!1,p=null,q=null,r=f,t=f,u=g.x,x=g.x+g.width,y=g.getCenterX(),B=g.y,A=g.y+g.height,z=g.getCenterY(),f=0;f<this.states.length;f++)g=this.states[f],null==g||this.isStateIgnored(g)||(this.horizontal&&(e.call(this,g.getCenterX(),g,!0),e.call(this,g.x,g,!1),e.call(this,g.x+g.width,g,!1),null==g.cell&&e.call(this,g.getCenterX(),g,!1)),this.vertical&&(d.call(this,
-g.getCenterY(),g,!0),d.call(this,g.y,g,!1),d.call(this,g.y+g.height,g,!1),null==g.cell&&d.call(this,g.getCenterY(),g,!1)));this.graph.snapDelta(b,a,!c,k,n);b=this.getDelta(a,l,b.x,p,b.y);c=this.graph.container;k||null==this.guideX?null!=this.guideX&&(e=d=null,null!=l&&null!=a&&(d=Math.min(a.y+b.y-this.graph.panDy,l.y),e=Math.max(a.y+a.height+b.y-this.graph.panDy,l.y+l.height)),this.guideX.points=null!=d&&null!=e?[new mxPoint(m,d),new mxPoint(m,e)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,c.scrollHeight-
-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";n||null==this.guideY?null!=this.guideY&&(e=d=null,null!=p&&null!=a&&(d=Math.min(a.x+b.x-this.graph.panDx,p.x),e=Math.max(a.x+a.width+b.x-this.graph.panDx,p.x+p.width)),this.guideY.points=null!=d&&null!=e?[new mxPoint(d,q),new mxPoint(e,q)]:[new mxPoint(-this.graph.panDx,q),new mxPoint(c.scrollWidth-3-this.graph.panDx,q)],this.guideY.stroke=
-this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden"}return b};mxGuide.prototype.getDelta=function(a,b,c,d,e){var f=this.graph.view.scale;if(this.rounded||null!=b&&null==b.cell)c=Math.round((a.x+c)/f)*f-a.x;if(this.rounded||null!=d&&null==d.cell)e=Math.round((a.y+e)/f)*f-a.y;return new mxPoint(c,e)};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
+k=k||f},f=this.graph.getView().scale,f=this.getGuideTolerance(c)*f,g=a.clone();g.x+=b.x;g.y+=b.y;for(var k=!1,l=null,m=null,n=!1,p=null,q=null,r=f,t=f,u=g.x,x=g.x+g.width,y=g.getCenterX(),B=g.y,A=g.y+g.height,z=g.getCenterY(),f=0;f<this.states.length;f++)g=this.states[f],null==g||this.isStateIgnored(g)||(this.horizontal&&(e.call(this,g.getCenterX(),g,!0),e.call(this,g.x,g,!1),e.call(this,g.x+g.width,g,!1),null==g.cell&&e.call(this,g.getCenterX(),g,!1)),this.vertical&&(d.call(this,g.getCenterY(),g,
+!0),d.call(this,g.y,g,!1),d.call(this,g.y+g.height,g,!1),null==g.cell&&d.call(this,g.getCenterY(),g,!1)));this.graph.snapDelta(b,a,!c,k,n);b=this.getDelta(a,l,b.x,p,b.y);c=this.graph.container;k||null==this.guideX?null!=this.guideX&&(e=d=null,null!=l&&null!=a&&(d=Math.min(a.y+b.y-this.graph.panDy,l.y),e=Math.max(a.y+a.height+b.y-this.graph.panDy,l.y+l.height)),this.guideX.points=null!=d&&null!=e?[new mxPoint(m,d),new mxPoint(m,e)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,c.scrollHeight-3-this.graph.panDy)],
+this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";n||null==this.guideY?null!=this.guideY&&(e=d=null,null!=p&&null!=a&&(d=Math.min(a.x+b.x-this.graph.panDx,p.x),e=Math.max(a.x+a.width+b.x-this.graph.panDx,p.x+p.width)),this.guideY.points=null!=d&&null!=e?[new mxPoint(d,q),new mxPoint(e,q)]:[new mxPoint(-this.graph.panDx,q),new mxPoint(c.scrollWidth-3-this.graph.panDx,q)],this.guideY.stroke=this.getGuideColor(p,
+!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden"}return b};mxGuide.prototype.getDelta=function(a,b,c,d,e){var f=this.graph.view.scale;if(this.rounded||null!=b&&null==b.cell)c=Math.round((a.x+c)/f)*f-a.x;if(this.rounded||null!=d&&null==d.cell)e=Math.round((a.y+e)/f)*f-a.y;return new mxPoint(c,e)};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
 mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxShape(a){this.stencil=a;this.initStyles()}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.antiAlias=!0;
 mxShape.prototype.minSvgStrokeWidth=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=8;mxShape.prototype.pointerEvents=!0;mxShape.prototype.svgPointerEvents="all";mxShape.prototype.shapePointerEvents=!1;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.vmlScale=1;
 mxShape.prototype.outline=!1;mxShape.prototype.visible=!0;mxShape.prototype.useSvgBoundingBox=!1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.initStyles=function(a){this.strokewidth=1;this.rotation=0;this.strokeOpacity=this.fillOpacity=this.opacity=100;this.flipV=this.flipH=!1};mxShape.prototype.isParseVml=function(){return!0};mxShape.prototype.isHtmlAllowed=function(){return!1};
@@ -550,7 +549,7 @@ mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBo
 1);a.grow(b*this.scale)};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;mxSwimlane.prototype.isRoundable=function(a,b,c,d,e){return!0};mxSwimlane.prototype.getTitleSize=function(){return Math.max(0,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE))};
 mxSwimlane.prototype.getLabelBounds=function(a){var b=this.getTitleSize();a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH||
 this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=this.getTitleSize();if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)};
-mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
+mxSwimlane.prototype.getArcSize=function(a,b,c){if("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))return Math.min(a/2,Math.min(b/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
 mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=this.getTitleSize(),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),k=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),l=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(l=this.getArcSize(d,e,f),l=Math.min((this.isHorizontal()?e:d)-f,Math.min(f,l)),this.paintRoundedSwimlane(a,b,c,d,e,f,l,g,k)):this.paintSwimlane(a,b,c,d,e,f,g,k);g=mxUtils.getValue(this.style,
 mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,l))};
 mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,k){a.begin();this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.fillAndStroke(),f<e&&(g==mxConstants.NONE?a.pointerEvents=!1:a.setFillColor(g),a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),g==mxConstants.NONE?a.stroke():a.fillAndStroke())):(a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),a.fillAndStroke(),f<d&&(g==mxConstants.NONE?a.pointerEvents=!1:a.setFillColor(g),a.begin(),a.moveTo(f,
@@ -1303,9 +1302,9 @@ mxGraph.prototype.createEdgeHandler=function(a,b){return b==mxEdgeStyle.Loop||b=
 mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};
 mxGraph.prototype.updateMouseEvent=function(a,b){if(null==a.graphX||null==a.graphY){var c=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=c.x-this.panDx;a.graphY=c.y-this.panDy;null==a.getCell()&&this.isMouseDown&&b==mxEvent.MOUSE_MOVE&&(a.state=this.view.getState(this.getCellAt(c.x,c.y,null,null,null,function(a){return null==a.shape||a.shape.paintBackground!=mxRectangleShape.prototype.paintBackground||"1"==mxUtils.getValue(a.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=a.shape.fill&&
 a.shape.fill!=mxConstants.NONE})))}return a};mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
-mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=!1;b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):mxClient.IS_GC||null==this.eventSource||b.getSource()==this.eventSource?mxClient.IS_TOUCH&&12>=mxClient.IOS_VERSION&&a==mxEvent.MOUSE_DOWN&&
-!d&&!mxEvent.isPenEvent(b.getEvent())&&(this.eventSource=b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect)):e=!0;this.isSyntheticEventIgnored(a,b,c)&&(e=!0);
-if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail)return!0;a==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:a!=mxEvent.MOUSE_DOWN||this.isMouseDown?!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(e=!0):(this.isMouseDown=!0,this.isMouseTrigger=d);e||a!=mxEvent.MOUSE_DOWN||(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
+mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=!1;b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):mxClient.IS_GC||null==this.eventSource||b.getSource()==this.eventSource?!mxClient.IS_TOUCH||a!=mxEvent.MOUSE_DOWN||d||mxEvent.isPenEvent(b.getEvent())||
+(this.eventSource=b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect)):e=!0;this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&
+a!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail)return!0;a==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:a!=mxEvent.MOUSE_DOWN||this.isMouseDown?!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(e=!0):(this.isMouseDown=!0,this.isMouseTrigger=d);e||a!=mxEvent.MOUSE_DOWN||(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
 mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&!b&&a==mxEvent.MOUSE_UP&&(this.ignoreMouseEvents=!0);return c};
 mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource(),d=null!=c.nodeName?c.nodeName.toLowerCase():"",e=!mxEvent.isMouseEvent(b.getEvent())||mxEvent.isLeftMouseButton(b.getEvent());return a==mxEvent.MOUSE_DOWN&&e&&("select"==d||"option"==d||"input"==d&&"checkbox"!=c.type&&"radio"!=c.type&&"button"!=c.type&&"submit"!=c.type&&"file"!=c.type)};mxGraph.prototype.getEventState=function(a){return a};
 mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{null==c&&(c=this);b=this.updateMouseEvent(b,a);if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))){var d=(new Date).getTime();if(!mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_UP&&!this.fireDoubleClick)if(null!=
@@ -1393,9 +1392,9 @@ mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.l
 mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1,mxClient.IS_IOS&&(a.getSvgScreenOffset=function(){return 0}));return a};
 mxGraphHandler.prototype.start=function(a,b,c,d){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=null!=d?d:this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.allCells=new mxDictionary;this.cloning=!1;for(b=this.cellCount=0;b<this.cells.length;b++)this.cellCount+=this.addStates(this.cells[b],this.allCells);if(this.guidesEnabled){this.guide=new mxGuide(this.graph,this.getGuideStates());
 var e=this.graph.model.getParent(a),f=2>this.graph.model.getChildCount(e),g=new mxDictionary;a=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell);for(b=0;b<a.length;b++)c=this.graph.view.getState(a[b]),null==c||g.get(c)||g.put(c,!0);this.guide.isStateIgnored=mxUtils.bind(this,function(a){var b=this.graph.model.getParent(a.cell);return null!=a.cell&&(!this.cloning&&this.isCellMoving(a.cell)||a.cell!=(this.target||e)&&!f&&!g.get(a)&&(null==this.target||2<=this.graph.model.getChildCount(this.target))&&
-b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent()):!0};
-mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a};mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};
-mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a};
+b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)};
+mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent())&&!this.graph.isConstrainedEvent(a.getEvent()):!0};mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a};
+mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a};
 mxGraphHandler.prototype.checkPreview=function(){this.livePreviewActive&&this.cloning?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?this.cloning&&this.livePreviewActive||(this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds))};
 mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(b.isConsumed()||!c.isMouseDown||null==this.cell||null==this.first||null==this.bounds||this.suspended)!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||b.isConsumed()||null==b.getState()&&null==b.sourceState||c.isMouseDown||(d=c.getCursorForMouseEvent(b),null==d&&c.isEnabled()&&c.isCellMovable(b.getCell())&&(d=c.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=
 d&&null!=b.sourceState&&b.sourceState.setCursor(d));else if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{var d=this.getDelta(b),e=c.tolerance;if(null!=this.shape||this.livePreviewActive||Math.abs(d.x)>e||Math.abs(d.y)>e){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));var e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=c.isGridEnabledEvent(b.getEvent()),g=b.getCell(),k=!0,l=null;this.cloning=e;c.isDropEnabled()&&
@@ -1732,7 +1731,7 @@ mxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a
 mxTooltipHandler.prototype.destroy=function(){this.destroyed||(this.graph.removeMouseListener(this),mxEvent.release(this.div),null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.destroyed=!0,this.div=null)};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
 mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
 function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.opacity=mxConstants.HIGHLIGHT_OPACITY,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var a=this.graph.view.getState(this.state.cell);null==a?this.hide():(this.state=a,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,
-this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=!0;mxCellHighlight.prototype.state=null;
+this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=null;mxCellHighlight.prototype.state=null;
 mxCellHighlight.prototype.spacing=2;mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();this.keepOnTop||this.shape.node.parentNode.firstChild==this.shape.node||this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
 mxCellHighlight.prototype.createShape=function(){var a=this.graph.cellRenderer.createShape(this.state);a.svgStrokeTolerance=this.graph.tolerance;a.points=this.state.absolutePoints;a.apply(this.state);a.stroke=this.highlightColor;a.opacity=this.opacity;a.isDashed=this.dashed;a.isShadow=!1;a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);this.graph.dialect!=
 mxConstants.DIALECT_SVG?a.pointerEvents=!1:a.svgPointerEvents="stroke";return a};mxCellHighlight.prototype.getStrokeWidth=function(a){return this.strokeWidth};
diff --git a/src/main/webapp/connect/confluence/admin.js b/src/main/webapp/connect/confluence/admin.js
index ebde9a5d6..db942a635 100644
--- a/src/main/webapp/connect/confluence/admin.js
+++ b/src/main/webapp/connect/confluence/admin.js
@@ -256,7 +256,7 @@ function replacePageMacro(page, regExps, processAttFn, pageUpdateSuccess, pageUp
 	return macrosCount;
 };
 
-var MassDiagramsProcessor = function(macroName, readableName, attParams, processAttFn, logDiv)
+var MassDiagramsProcessor = function(macroName, readableName, attParams, processAttFn, logDiv, doneFn)
 {
 	var start = 0, limit = 100;
 	var regExps = getMacroRegExps(macroName, attParams);
@@ -339,6 +339,11 @@ var MassDiagramsProcessor = function(macroName, readableName, attParams, process
 		if (processPage())
 		{
 			logDiv.append($('<div>' + mxResources.get('confAAllDiagDone', [readableName]) + '</div>'));
+			
+			if (doneFn)
+			{
+				doneFn();
+			}
 		}
 	};
 	
@@ -387,6 +392,11 @@ var MassDiagramsProcessor = function(macroName, readableName, attParams, process
 		if (pagesCount == 0)
 		{
 			logDiv.append($('<div>' + mxResources.get('confANoDiagFound', [readableName]) + '</div>'));
+			
+			if (doneFn)
+			{
+				doneFn();
+			}
 		}
 		else
 		{
@@ -918,7 +928,7 @@ function getAndApplyTranslation(callback)
 	});
 };
 
-var LucidConnMassImporter = function(docsMap, importExtensionId, logDiv)
+var LucidConnMassImporter = function(docsMap, importExtensionId, logDiv, doneFn)
 {
 	var link = document.createElement('a');
 	link.href = location.href;
@@ -939,6 +949,8 @@ var LucidConnMassImporter = function(docsMap, importExtensionId, logDiv)
 		
 		var docInfo = docsMap[docId];
 		var docName = docInfo? docInfo.text : docId;
+		var diagramName = docName + '-' + docId + '.drawio';
+		var diagramDisplayName = docName;
 		
 		logDiv.append($('<div>' + mxResources.get('confAGliffyDiagFound', [AC.htmlEntities(docName), 'Lucidchart']) + '...</div>'));
 		
@@ -974,13 +986,14 @@ var LucidConnMassImporter = function(docsMap, importExtensionId, logDiv)
 							imageType = resp.content.substring(5, p-1); //5 is the length of "data:"
 						}
 						
-						AC.saveDiagram(pageId, docName + ".drawio", drawXML,
+						AC.saveDiagram(pageId, diagramName, drawXML,
 						function(resp)
 						{
 		 					resp = JSON.parse(resp);
 		 					
 		 					var attInfo = {
-		 						name: docName + ".drawio", 
+		 						name: diagramName,
+		 						diagramDisplayName: diagramDisplayName,
 		 						revision: resp.results[0].version.number,
 		 						macroId: macroId,
  								width: autoSize == 1? null : width,
@@ -990,7 +1003,7 @@ var LucidConnMassImporter = function(docsMap, importExtensionId, logDiv)
 	 						};
 		 					
 		 					//Add custom content
-		 					AC.saveCustomContent(spaceKey, pageId, pageType, docName + ".drawio", docName + ".drawio", attInfo.revision, null, null, 
+		 					AC.saveCustomContent(spaceKey, pageId, pageType, diagramName, diagramDisplayName, attInfo.revision, null, null, 
  							function(responseText)
  							{
  								var content = JSON.parse(responseText);
@@ -1000,7 +1013,7 @@ var LucidConnMassImporter = function(docsMap, importExtensionId, logDiv)
 								
  								if (imageData != null)
  								{
- 									AC.saveDiagram(pageId, docName + '.png', AC.b64toBlob(imageData, imageType),
+ 									AC.saveDiagram(pageId, diagramName + '.png', AC.b64toBlob(imageData, imageType),
 									function()
 									{
  										logDiv.append($('<div>' + mxResources.get('confALucidDiagImgImported', [AC.htmlEntities(docName), 'Lucidchart']) + '</div>'));
@@ -1046,5 +1059,5 @@ var LucidConnMassImporter = function(docsMap, importExtensionId, logDiv)
 	
 	MassDiagramsProcessor('lucidchart', 'Lucidchart', 
 			['documentId', 'autoSize', 'pageCount', 'pages', 'autoUpdate', 'width', 'height', 'align', 'updated'], 
-			importLucidDoc, logDiv);
+			importLucidDoc, logDiv, doneFn);
 };
diff --git a/src/main/webapp/connect/confluence/lucidMassImport.html b/src/main/webapp/connect/confluence/lucidMassImport.html
index 076b0f11b..fbb4fd55d 100644
--- a/src/main/webapp/connect/confluence/lucidMassImport.html
+++ b/src/main/webapp/connect/confluence/lucidMassImport.html
@@ -77,7 +77,11 @@
 						
 						importBtn.click(function()
 						{
-							LucidConnMassImporter(response.filesMap, importExtensionId, logDiv)
+							$('#loadingImg').show();
+							LucidConnMassImporter(response.filesMap, importExtensionId, logDiv, function()
+							{
+								$('#loadingImg').hide();
+							})
 						});
 					}	
 				};
diff --git a/src/main/webapp/connect/confluence/support.html b/src/main/webapp/connect/confluence/support.html
index 6addf5abf..784d7cde5 100644
--- a/src/main/webapp/connect/confluence/support.html
+++ b/src/main/webapp/connect/confluence/support.html
@@ -27,7 +27,7 @@
 							<div id="p_content">
 								<div class="p_lower_content">
 									<ul>
-										<li>For support requests relating to installation, data load/save, broken functionality problems, email <a href="mailto:support@draw.io?subject=Confluence%20Cloud%20Support%20-%20TOPIC">support@draw.io</a>.
+										<li>For support requests relating to installation, data load/save, broken functionality problems, post to our <a href="https://drawio.atlassian.net/servicedesk/customer/portal/14/group/15/create/49" target="_blank">service desk</a>.
 										<li>Please include the draw.io version and SEN shown on this page to speed up the support process.</li>
 										<li>Support requests should be routed via an admin, wherever possible.</li>
 									</ul>
@@ -42,11 +42,9 @@
 									<ul>
 										<li>
 											<a class="external-link"
-												href="https://drawio-app.com/learning/interactive-tutorials/"
+												href="https://drawio-app.com/customise-default-colours-fonts-styles-and-the-draw-io-ui-in-confluence-cloud/"
 												rel="nofollow" target="_blank">Customise colours, fonts
-												and styles</a>&nbsp;of&nbsp;<a class="external-link"
-												href="https://drawio-app.com/learning/interactive-tutorials/"
-												rel="nofollow" target="_blank">draw.io</a>&nbsp;for Confluence
+												and styles</a>&nbsp;of&nbsp;draw.io&nbsp;for Confluence
 										</li>
 										<li>
 											<a class="external-link"
@@ -54,12 +52,6 @@
 												rel="nofollow" target="_blank">Embed our interactive
 												tutorials for your user base</a>
 										</li>
-										<li>
-											<a class="external-link"
-												href="https://support.draw.io/display/DFCS/draw.io+for+Confluence+and+JIRA+support+terms+and+Service+Level+Agreement"
-												rel="nofollow" target="_blank">View our support terms and
-												SLAs</a>
-										</li>
 										<!-- li>Optionally configure draw.io by following the posts 
 											<a href="https://about.draw.io/customise-default-colours-fonts-styles-and-the-draw-io-ui-in-confluence-cloud/" target="_blank">here</a> and 
 											<a href="https://about.draw.io/customise-default-shape-libraries-templates-and-plugins-in-draw-io-for-confluence-cloud/">here</a>.
@@ -81,7 +73,7 @@
 											<a class="external-link"
 												href="https://about.draw.io/features/training-material/"
 												rel="nofollow" target="_blank">Have a look at our
-												cost-free learning offerings</a>
+												training materials</a>
 										</li>
 										<li>
 											<a class="external-link"
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 19c47aeda..6961694b9 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -142,14 +142,13 @@ window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefi
 (function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
 null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
 if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);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:"4.1.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&
+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","se"];var mxClient={VERSION:"4.1.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&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:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&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:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IOS_VERSION:function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);if(null!=a&&0<a.length)return parseInt(a[1])}return 0}(),IS_GC:/Google Inc/.test(navigator.vendor),
-IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_CHROMEOS:/\bCrOS\b/.test(navigator.appVersion),
-IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf("Mac")),IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c,d){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="UTF-8" type="text/css"/>');else{var e=c.createElement("link");e.setAttribute("rel",
-a);e.setAttribute("href",b);e.setAttribute("charset","UTF-8");e.setAttribute("type","text/css");d&&e.setAttribute("id",d);c.getElementsByTagName("head")[0].appendChild(e)}},loadResources:function(a,b){function c(){0==--d&&a()}for(var d=mxClient.defaultBundles.length,e=0;e<mxClient.defaultBundles.length;e++)mxResources.add(mxClient.defaultBundles[e],b,c)},include:function(a){document.write('<script src="'+a+'">\x3c/script>')}};
-mxClient.IS_SF&&mxClient.IS_TOUCH&&!mxClient.IS_IOS&&(mxClient.IOS_VERSION=13,mxClient.IOS=!0);"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1);"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);
+0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=
+navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_CHROMEOS:/\bCrOS\b/.test(navigator.appVersion),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf("Mac")),IS_LOCAL:0>document.location.href.indexOf("http://")&&
+0>document.location.href.indexOf("https://"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c,d){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="UTF-8" type="text/css"/>');else{var e=c.createElement("link");e.setAttribute("rel",a);e.setAttribute("href",b);e.setAttribute("charset","UTF-8");e.setAttribute("type","text/css");d&&e.setAttribute("id",d);c.getElementsByTagName("head")[0].appendChild(e)}},loadResources:function(a,
+b){function c(){0==--d&&a()}for(var d=mxClient.defaultBundles.length,e=0;e<mxClient.defaultBundles.length;e++)mxResources.add(mxClient.defaultBundles[e],b,c)},include:function(a){document.write('<script src="'+a+'">\x3c/script>')}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1);"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);
 "undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";
 mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
 mxClient.IS_VML&&(mxClient.IS_SVG?mxClient.IS_VML=!1:(null!=document.namespaces&&(8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"))),mxClient.IS_QUIRKS&&30<=document.styleSheets.length?
@@ -389,7 +388,7 @@ mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){
 mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e))for(d=this.graph.getModel().getChildCount(a),e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)};
 mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
 mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
-mxImageBundle.prototype.images=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;
+mxImageBundle.prototype.alt=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;
 mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawCellState.apply(this,arguments)})),this.includeOverlays&&this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawOverlays.apply(this,arguments)})))};
 mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.getLinkForCellState=function(a,b){return null};mxImageExport.prototype.drawCellState=function(a,b){var c=this.getLinkForCellState(a,b);null!=c&&b.setLink(c);this.drawShape(a,b);this.drawText(a,b);null!=c&&b.setLink(null)};
 mxImageExport.prototype.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),a.shape.paint(b),b.restore())};mxImageExport.prototype.drawText=function(a,b){null!=a.text&&a.text.checkBounds()&&(b.save(),a.text.paint(b),b.restore())};mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(a,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}
@@ -528,10 +527,10 @@ function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=nul
 mxGuide.prototype.getGuideTolerance=function(a){return a&&this.graph.gridEnabled?this.graph.gridSize/2:this.tolerance};mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};mxGuide.prototype.isStateIgnored=function(a){return!1};
 mxGuide.prototype.move=function(a,b,c,d){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){d=function(c,d,e){var f=!1;e&&Math.abs(c-z)<t?(b.y=c-a.getCenterY(),t=Math.abs(c-z),f=!0):e||(Math.abs(c-B)<t?(b.y=c-a.y,t=Math.abs(c-B),f=!0):Math.abs(c-A)<t&&(b.y=c-a.y-a.height,t=Math.abs(c-A),f=!0));f&&(p=d,q=c,null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=
 !1,this.guideY.init(this.graph.getView().getOverlayPane())));n=n||f};var e=function(c,d,e){var f=!1;e&&Math.abs(c-y)<r?(b.x=c-a.getCenterX(),r=Math.abs(c-y),f=!0):e||(Math.abs(c-u)<r?(b.x=c-a.x,r=Math.abs(c-u),f=!0):Math.abs(c-x)<r&&(b.x=c-a.x-a.width,r=Math.abs(c-x),f=!0));f&&(l=d,m=c,null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));
-k=k||f};this.graph.getView();var f=this.graph.getView().scale,f=this.getGuideTolerance(c)*f,g=a.clone();g.x+=b.x;g.y+=b.y;for(var k=!1,l=null,m=null,n=!1,p=null,q=null,r=f,t=f,u=g.x,x=g.x+g.width,y=g.getCenterX(),B=g.y,A=g.y+g.height,z=g.getCenterY(),f=0;f<this.states.length;f++)g=this.states[f],null==g||this.isStateIgnored(g)||(this.horizontal&&(e.call(this,g.getCenterX(),g,!0),e.call(this,g.x,g,!1),e.call(this,g.x+g.width,g,!1),null==g.cell&&e.call(this,g.getCenterX(),g,!1)),this.vertical&&(d.call(this,
-g.getCenterY(),g,!0),d.call(this,g.y,g,!1),d.call(this,g.y+g.height,g,!1),null==g.cell&&d.call(this,g.getCenterY(),g,!1)));this.graph.snapDelta(b,a,!c,k,n);b=this.getDelta(a,l,b.x,p,b.y);c=this.graph.container;k||null==this.guideX?null!=this.guideX&&(e=d=null,null!=l&&null!=a&&(d=Math.min(a.y+b.y-this.graph.panDy,l.y),e=Math.max(a.y+a.height+b.y-this.graph.panDy,l.y+l.height)),this.guideX.points=null!=d&&null!=e?[new mxPoint(m,d),new mxPoint(m,e)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,c.scrollHeight-
-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";n||null==this.guideY?null!=this.guideY&&(e=d=null,null!=p&&null!=a&&(d=Math.min(a.x+b.x-this.graph.panDx,p.x),e=Math.max(a.x+a.width+b.x-this.graph.panDx,p.x+p.width)),this.guideY.points=null!=d&&null!=e?[new mxPoint(d,q),new mxPoint(e,q)]:[new mxPoint(-this.graph.panDx,q),new mxPoint(c.scrollWidth-3-this.graph.panDx,q)],this.guideY.stroke=
-this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden"}return b};mxGuide.prototype.getDelta=function(a,b,c,d,e){var f=this.graph.view.scale;if(this.rounded||null!=b&&null==b.cell)c=Math.round((a.x+c)/f)*f-a.x;if(this.rounded||null!=d&&null==d.cell)e=Math.round((a.y+e)/f)*f-a.y;return new mxPoint(c,e)};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
+k=k||f},f=this.graph.getView().scale,f=this.getGuideTolerance(c)*f,g=a.clone();g.x+=b.x;g.y+=b.y;for(var k=!1,l=null,m=null,n=!1,p=null,q=null,r=f,t=f,u=g.x,x=g.x+g.width,y=g.getCenterX(),B=g.y,A=g.y+g.height,z=g.getCenterY(),f=0;f<this.states.length;f++)g=this.states[f],null==g||this.isStateIgnored(g)||(this.horizontal&&(e.call(this,g.getCenterX(),g,!0),e.call(this,g.x,g,!1),e.call(this,g.x+g.width,g,!1),null==g.cell&&e.call(this,g.getCenterX(),g,!1)),this.vertical&&(d.call(this,g.getCenterY(),g,
+!0),d.call(this,g.y,g,!1),d.call(this,g.y+g.height,g,!1),null==g.cell&&d.call(this,g.getCenterY(),g,!1)));this.graph.snapDelta(b,a,!c,k,n);b=this.getDelta(a,l,b.x,p,b.y);c=this.graph.container;k||null==this.guideX?null!=this.guideX&&(e=d=null,null!=l&&null!=a&&(d=Math.min(a.y+b.y-this.graph.panDy,l.y),e=Math.max(a.y+a.height+b.y-this.graph.panDy,l.y+l.height)),this.guideX.points=null!=d&&null!=e?[new mxPoint(m,d),new mxPoint(m,e)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,c.scrollHeight-3-this.graph.panDy)],
+this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";n||null==this.guideY?null!=this.guideY&&(e=d=null,null!=p&&null!=a&&(d=Math.min(a.x+b.x-this.graph.panDx,p.x),e=Math.max(a.x+a.width+b.x-this.graph.panDx,p.x+p.width)),this.guideY.points=null!=d&&null!=e?[new mxPoint(d,q),new mxPoint(e,q)]:[new mxPoint(-this.graph.panDx,q),new mxPoint(c.scrollWidth-3-this.graph.panDx,q)],this.guideY.stroke=this.getGuideColor(p,
+!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden"}return b};mxGuide.prototype.getDelta=function(a,b,c,d,e){var f=this.graph.view.scale;if(this.rounded||null!=b&&null==b.cell)c=Math.round((a.x+c)/f)*f-a.x;if(this.rounded||null!=d&&null==d.cell)e=Math.round((a.y+e)/f)*f-a.y;return new mxPoint(c,e)};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
 mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxShape(a){this.stencil=a;this.initStyles()}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.antiAlias=!0;
 mxShape.prototype.minSvgStrokeWidth=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=8;mxShape.prototype.pointerEvents=!0;mxShape.prototype.svgPointerEvents="all";mxShape.prototype.shapePointerEvents=!1;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.vmlScale=1;
 mxShape.prototype.outline=!1;mxShape.prototype.visible=!0;mxShape.prototype.useSvgBoundingBox=!1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.initStyles=function(a){this.strokewidth=1;this.rotation=0;this.strokeOpacity=this.fillOpacity=this.opacity=100;this.flipV=this.flipH=!1};mxShape.prototype.isParseVml=function(){return!0};mxShape.prototype.isHtmlAllowed=function(){return!1};
@@ -694,7 +693,7 @@ mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBo
 1);a.grow(b*this.scale)};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;mxSwimlane.prototype.isRoundable=function(a,b,c,d,e){return!0};mxSwimlane.prototype.getTitleSize=function(){return Math.max(0,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE))};
 mxSwimlane.prototype.getLabelBounds=function(a){var b=this.getTitleSize();a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH||
 this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=this.getTitleSize();if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)};
-mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
+mxSwimlane.prototype.getArcSize=function(a,b,c){if("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))return Math.min(a/2,Math.min(b/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
 mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=this.getTitleSize(),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),k=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),l=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(l=this.getArcSize(d,e,f),l=Math.min((this.isHorizontal()?e:d)-f,Math.min(f,l)),this.paintRoundedSwimlane(a,b,c,d,e,f,l,g,k)):this.paintSwimlane(a,b,c,d,e,f,g,k);g=mxUtils.getValue(this.style,
 mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,l))};
 mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,k){a.begin();this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.fillAndStroke(),f<e&&(g==mxConstants.NONE?a.pointerEvents=!1:a.setFillColor(g),a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),g==mxConstants.NONE?a.stroke():a.fillAndStroke())):(a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),a.fillAndStroke(),f<d&&(g==mxConstants.NONE?a.pointerEvents=!1:a.setFillColor(g),a.begin(),a.moveTo(f,
@@ -1447,9 +1446,9 @@ mxGraph.prototype.createEdgeHandler=function(a,b){return b==mxEdgeStyle.Loop||b=
 mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};
 mxGraph.prototype.updateMouseEvent=function(a,b){if(null==a.graphX||null==a.graphY){var c=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=c.x-this.panDx;a.graphY=c.y-this.panDy;null==a.getCell()&&this.isMouseDown&&b==mxEvent.MOUSE_MOVE&&(a.state=this.view.getState(this.getCellAt(c.x,c.y,null,null,null,function(a){return null==a.shape||a.shape.paintBackground!=mxRectangleShape.prototype.paintBackground||"1"==mxUtils.getValue(a.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=a.shape.fill&&
 a.shape.fill!=mxConstants.NONE})))}return a};mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
-mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=!1;b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):mxClient.IS_GC||null==this.eventSource||b.getSource()==this.eventSource?mxClient.IS_TOUCH&&12>=mxClient.IOS_VERSION&&a==mxEvent.MOUSE_DOWN&&
-!d&&!mxEvent.isPenEvent(b.getEvent())&&(this.eventSource=b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect)):e=!0;this.isSyntheticEventIgnored(a,b,c)&&(e=!0);
-if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail)return!0;a==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:a!=mxEvent.MOUSE_DOWN||this.isMouseDown?!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(e=!0):(this.isMouseDown=!0,this.isMouseTrigger=d);e||a!=mxEvent.MOUSE_DOWN||(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
+mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=!1;b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):mxClient.IS_GC||null==this.eventSource||b.getSource()==this.eventSource?!mxClient.IS_TOUCH||a!=mxEvent.MOUSE_DOWN||d||mxEvent.isPenEvent(b.getEvent())||
+(this.eventSource=b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect)):e=!0;this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&
+a!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail)return!0;a==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:a!=mxEvent.MOUSE_DOWN||this.isMouseDown?!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(e=!0):(this.isMouseDown=!0,this.isMouseTrigger=d);e||a!=mxEvent.MOUSE_DOWN||(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
 mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&!b&&a==mxEvent.MOUSE_UP&&(this.ignoreMouseEvents=!0);return c};
 mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource(),d=null!=c.nodeName?c.nodeName.toLowerCase():"",e=!mxEvent.isMouseEvent(b.getEvent())||mxEvent.isLeftMouseButton(b.getEvent());return a==mxEvent.MOUSE_DOWN&&e&&("select"==d||"option"==d||"input"==d&&"checkbox"!=c.type&&"radio"!=c.type&&"button"!=c.type&&"submit"!=c.type&&"file"!=c.type)};mxGraph.prototype.getEventState=function(a){return a};
 mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{null==c&&(c=this);b=this.updateMouseEvent(b,a);if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))){var d=(new Date).getTime();if(!mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_UP&&!this.fireDoubleClick)if(null!=
@@ -1537,9 +1536,9 @@ mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.l
 mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1,mxClient.IS_IOS&&(a.getSvgScreenOffset=function(){return 0}));return a};
 mxGraphHandler.prototype.start=function(a,b,c,d){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=null!=d?d:this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.allCells=new mxDictionary;this.cloning=!1;for(b=this.cellCount=0;b<this.cells.length;b++)this.cellCount+=this.addStates(this.cells[b],this.allCells);if(this.guidesEnabled){this.guide=new mxGuide(this.graph,this.getGuideStates());
 var e=this.graph.model.getParent(a),f=2>this.graph.model.getChildCount(e),g=new mxDictionary;a=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell);for(b=0;b<a.length;b++)c=this.graph.view.getState(a[b]),null==c||g.get(c)||g.put(c,!0);this.guide.isStateIgnored=mxUtils.bind(this,function(a){var b=this.graph.model.getParent(a.cell);return null!=a.cell&&(!this.cloning&&this.isCellMoving(a.cell)||a.cell!=(this.target||e)&&!f&&!g.get(a)&&(null==this.target||2<=this.graph.model.getChildCount(this.target))&&
-b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent()):!0};
-mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a};mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};
-mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a};
+b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)};
+mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent())&&!this.graph.isConstrainedEvent(a.getEvent()):!0};mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a};
+mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a};
 mxGraphHandler.prototype.checkPreview=function(){this.livePreviewActive&&this.cloning?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?this.cloning&&this.livePreviewActive||(this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds))};
 mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(b.isConsumed()||!c.isMouseDown||null==this.cell||null==this.first||null==this.bounds||this.suspended)!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||b.isConsumed()||null==b.getState()&&null==b.sourceState||c.isMouseDown||(d=c.getCursorForMouseEvent(b),null==d&&c.isEnabled()&&c.isCellMovable(b.getCell())&&(d=c.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=
 d&&null!=b.sourceState&&b.sourceState.setCursor(d));else if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{var d=this.getDelta(b),e=c.tolerance;if(null!=this.shape||this.livePreviewActive||Math.abs(d.x)>e||Math.abs(d.y)>e){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));var e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=c.isGridEnabledEvent(b.getEvent()),g=b.getCell(),k=!0,l=null;this.cloning=e;c.isDropEnabled()&&
@@ -1876,7 +1875,7 @@ mxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a
 mxTooltipHandler.prototype.destroy=function(){this.destroyed||(this.graph.removeMouseListener(this),mxEvent.release(this.div),null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.destroyed=!0,this.div=null)};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
 mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
 function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.opacity=mxConstants.HIGHLIGHT_OPACITY,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var a=this.graph.view.getState(this.state.cell);null==a?this.hide():(this.state=a,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,
-this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=!0;mxCellHighlight.prototype.state=null;
+this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=null;mxCellHighlight.prototype.state=null;
 mxCellHighlight.prototype.spacing=2;mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();this.keepOnTop||this.shape.node.parentNode.firstChild==this.shape.node||this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
 mxCellHighlight.prototype.createShape=function(){var a=this.graph.cellRenderer.createShape(this.state);a.svgStrokeTolerance=this.graph.tolerance;a.points=this.state.absolutePoints;a.apply(this.state);a.stroke=this.highlightColor;a.opacity=this.opacity;a.isDashed=this.dashed;a.isShadow=!1;a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);this.graph.dialect!=
 mxConstants.DIALECT_SVG?a.pointerEvents=!1:a.svgPointerEvents="stroke";return a};mxCellHighlight.prototype.getStrokeWidth=function(a){return this.strokeWidth};
@@ -2536,7 +2535,7 @@ Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarni
 Graph.createSvgImage=function(a,c,d,b,f){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=b&&null!=f?'viewBox="0 0 '+b+" "+f+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)};
 Graph.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&65535!=b&&65534!=b&&c.push(a.charAt(d))}return c.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};Graph.compressNode=function(a,c){var d=mxUtils.getXml(a);return Graph.compress(c?d:Graph.zapGremlins(d))};
 Graph.compress=function(a,c){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=c?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(d):Base64.encode(d,!0)};Graph.decompress=function(a,c,d){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);c=decodeURIComponent(c?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return d?c:Graph.zapGremlins(c)};
-Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="",a.style.color="#000000",a.style.color=""),a=a.nextSibling};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
+Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
 mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
 Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";
 Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;
@@ -8493,9 +8492,9 @@ DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveR
 DrawioFile.prototype.synchronizeFile=function(a,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,e):this.updateFile(a,e)};
 DrawioFile.prototype.updateFile=function(a,e,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=k?this.mergeFile(k,a,e,b):this.reloadFile(a,e))}catch(f){null!=e&&e(f)}}),e))};
 DrawioFile.prototype.mergeFile=function(a,e,c,b){var k=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),l=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=l&&0<l.length){this.shadowPages=l;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var d=[this.ui.diffPages(null!=b?b:f,this.shadowPages)];if(!this.ignorePatches(d)){var g=this.ui.patchPages(f,
-d[0]);b={};var m=this.ui.getHashValueForPages(g,b),f={},n=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",n==m,m);if(null!=m&&m!=n){var p=this.compressReportData(this.getAnonymizedXmlForPages(l)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),t=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,d,"Shadow Details: "+JSON.stringify(b)+
-"\nChecksum: "+m+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+t+"\nTo: "+q+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+v,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=c&&c(y);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var u=this.getCurrentUser(),z=null!=u?u.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,y)}}catch(A){}}};
+d[0]);b={};var m=this.ui.getHashValueForPages(g,b),f={},n=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",n==m,m);if(null!=m&&m!=n){var p=this.compressReportData(this.getAnonymizedXmlForPages(l)),u=this.compressReportData(this.getAnonymizedXmlForPages(g)),t=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,d,"Shadow Details: "+JSON.stringify(b)+
+"\nChecksum: "+m+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+t+"\nTo: "+q+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+u,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=c&&c(y);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var v=this.getCurrentUser(),z=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,y)}}catch(A){}}};
 DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var e=new mxCodec(mxUtils.createXmlDocument()),c=e.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var k=e.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,k,!0);c.appendChild(k)}return mxUtils.getPrettyXml(c)};
 DrawioFile.prototype.compressReportData=function(a,e,c){e=null!=e?e:1E4;null!=c&&null!=a&&a.length>c?a=a.substring(0,c)+"[...]":null!=a&&a.length>e&&(a=Graph.compress(a)+"\n");return a};
 DrawioFile.prototype.checksumError=function(a,e,c,b,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=e)for(a=0;a<e.length;a++)this.ui.anonymizePatch(e[a]);var f=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(e,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
@@ -8503,7 +8502,7 @@ DrawioFile.prototype.checksumError=function(a,e,c,b,k){this.stats.checksumErrors
 try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(g){}}}catch(g){}};
 DrawioFile.prototype.sendErrorReport=function(a,e,c,b){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),f=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),l=this.getCurrentUser(),d=null!=l?this.ui.hashValue(l.id):"unknown",g=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",m=this.getTitle(),n=m.lastIndexOf("."),l="xml";0<n&&(l=m.substring(n));var p=null!=c?c.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
 ":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+l+")\nUser="+d+g+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
-"")+(null!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+k+"\n\nData:\n"+f,b)}catch(v){}};
+"")+(null!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+k+"\n\nData:\n"+f,b)}catch(u){}};
 DrawioFile.prototype.reloadFile=function(a,e){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),e=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(e,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=
 this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}catch(b){null!=e&&e(b)}};DrawioFile.prototype.copyFile=function(a,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
 DrawioFile.prototype.ignorePatches=function(a){for(var e=!0,c=0;c<a.length&&e;c++)e=e&&0==Object.keys(a[c]).length;return e};
@@ -8568,23 +8567,23 @@ StorageFile.listFiles=function(a,e,c,b){a.getDatabaseItems(function(a){var b=[];
 StorageLibrary.prototype.isRenamable=function(a,e,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,e,c){DrawioFile.call(this,a,e);this.title=c;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,e,c){RemoteFile.call(this,a,e,c.title);this.libObj=c};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,e,c){};
 RemoteLibrary.prototype.saveAs=function(a,e,c){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,e,c){StorageFile.call(this,a,e,c);a=c;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,c){return!1};UrlLibrary.prototype.saveAs=function(a,e,c){};UrlLibrary.prototype.open=function(){};/*
  mxClient.IS_IOS || */
-var StorageDialog=function(a,e,c){function b(d,b,f,k,u,v){function l(){mxEvent.addListener(x,"click",null!=v?v:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,g.checked);e()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,g.checked);
+var StorageDialog=function(a,e,c){function b(d,b,f,k,v,u){function l(){mxEvent.addListener(x,"click",null!=u?u:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,g.checked);e()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,g.checked);
 e()})):(a.setMode(f,g.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}++m>c&&(mxUtils.br(n),m=0);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.marginTop="2px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height=StorageDialog.extended?"50px":
 "100px";x.style.whiteSpace="nowrap";x.setAttribute("title",b);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.overflow="hidden";if(null!=d){var q=document.createElement("img");q.setAttribute("src",d);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width=StorageDialog.extended?"24px":"60px";q.style.height=StorageDialog.extended?"24px":"60px";q.style.paddingBottom=StorageDialog.extended?
-"4px":"6px";x.appendChild(q)}else t.style.paddingTop="5px",t.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(t.style.paddingTop="0px",t.style.marginTop="-2px");StorageDialog.extended&&(x.style.paddingTop="4px",x.style.marginBottom="0px",t.display="inline-block",2==c&&(q.style.width="38px",q.style.height="38px",x.style.width="80px",x.style.height="68px"));x.appendChild(t);mxUtils.write(t,b);if(null!=u)for(d=0;d<u.length;d++)mxUtils.br(t),
-mxUtils.write(t,u[d]);if(null!=k&&null==a[k]){q.style.visibility="hidden";mxUtils.setOpacity(t,10);var B=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});B.spin(x);var C=window.setTimeout(function(){null==a[k]&&(B.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(d,b){null!=a[k]&&b.getProperty("client")==a[k]&&(window.clearTimeout(C),mxUtils.setOpacity(t,
+"4px":"6px";x.appendChild(q)}else t.style.paddingTop="5px",t.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(t.style.paddingTop="0px",t.style.marginTop="-2px");StorageDialog.extended&&(x.style.paddingTop="4px",x.style.marginBottom="0px",t.display="inline-block",2==c&&(q.style.width="38px",q.style.height="38px",x.style.width="80px",x.style.height="68px"));x.appendChild(t);mxUtils.write(t,b);if(null!=v)for(d=0;d<v.length;d++)mxUtils.br(t),
+mxUtils.write(t,v[d]);if(null!=k&&null==a[k]){q.style.visibility="hidden";mxUtils.setOpacity(t,10);var B=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});B.spin(x);var C=window.setTimeout(function(){null==a[k]&&(B.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(d,b){null!=a[k]&&b.getProperty("client")==a[k]&&(window.clearTimeout(C),mxUtils.setOpacity(t,
 100),q.style.visibility="",B.stop(),l(),"drive"==k&&null!=p.parentNode&&p.parentNode.removeChild(p))}))}else l();n.appendChild(x)}c=null!=c?c:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var f=a.addLanguageMenu(k,!0);null!=f&&(f.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",
 mxResources.get("help"));f.setAttribute("target","_blank");f.style.position="absolute";f.style.userSelect="none";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var l=document.createElement("img");mxUtils.setOpacity(l,50);l.style.height="16px";l.style.width="16px";l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);l.style.marginRight="2px";f.appendChild(l);
 mxUtils.write(f,mxResources.get("help"));k.appendChild(f)}var d=document.createElement("div");d.style.position="absolute";d.style.cursor="pointer";d.style.fontSize="12px";d.style.bottom="28px";d.style.color="gray";d.style.userSelect="none";mxUtils.write(d,mxResources.get("decideLater"));mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0)");d.style.left="50%";this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)d.style.marginLeft=-Math.round(d.clientWidth/2)+"px"};k.appendChild(d);
 mxEvent.addListener(d,"click",function(){a.hideDialog();var d=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d});f=document.createElement("div");mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=
-!0;var m=0,n=document.createElement("div");n.style.paddingTop="2px";f.appendChild(n);var p=document.createElement("p"),l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.paddingTop="4px";l.style.paddingBottom="16px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("saveDiagramsTo")+":");k.appendChild(l);var v=function(){m=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
+!0;var m=0,n=document.createElement("div");n.style.paddingTop="2px";f.appendChild(n);var p=document.createElement("p"),l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.paddingTop="4px";l.style.paddingBottom="16px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("saveDiagramsTo")+":");k.appendChild(l);var u=function(){m=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,
 "drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,
-"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};k.appendChild(f);v();l=document.createElement("p");l.style.marginTop="8px";l.style.marginBottom="6px";var t=document.createElement("div");t.style.marginBottom="10px";if(!a.isOfflineApp()){var q=document.createElement("a");q.style.color="gray";q.style.fontSize="12px";q.style.cursor="pointer";
-q.style.userSelect="none";mxUtils.write(q,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");t.appendChild(q);l.appendChild(t);mxEvent.addListener(q,"click",function(a){n.innerHTML="";q.innerHTML="";StorageDialog.extended=!StorageDialog.extended;v();mxUtils.write(q,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}l.appendChild(g);var u=document.createElement("span");u.style.color="gray";u.style.fontSize=
-"12px";u.style.userSelect="none";mxUtils.write(u," "+mxResources.get("rememberThisSetting"));l.appendChild(u);mxUtils.br(l);t=a.getRecent();if(!a.isOfflineApp()&&null!=t&&0<t.length){var z=document.createElement("select");z.style.marginTop="8px";z.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+"...");z.appendChild(y);for(y=0;y<t.length;y++)(function(a){var d=
+"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};k.appendChild(f);u();l=document.createElement("p");l.style.marginTop="8px";l.style.marginBottom="6px";var t=document.createElement("div");t.style.marginBottom="10px";if(!a.isOfflineApp()){var q=document.createElement("a");q.style.color="gray";q.style.fontSize="12px";q.style.cursor="pointer";
+q.style.userSelect="none";mxUtils.write(q,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");t.appendChild(q);l.appendChild(t);mxEvent.addListener(q,"click",function(a){n.innerHTML="";q.innerHTML="";StorageDialog.extended=!StorageDialog.extended;u();mxUtils.write(q,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}l.appendChild(g);var v=document.createElement("span");v.style.color="gray";v.style.fontSize=
+"12px";v.style.userSelect="none";mxUtils.write(v," "+mxResources.get("rememberThisSetting"));l.appendChild(v);mxUtils.br(l);t=a.getRecent();if(!a.isOfflineApp()&&null!=t&&0<t.length){var z=document.createElement("select");z.style.marginTop="8px";z.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+"...");z.appendChild(y);for(y=0;y<t.length;y++)(function(a){var d=
 a.mode;d==App.MODE_GOOGLE?d="googleDrive":d==App.MODE_ONEDRIVE&&(d="oneDrive");var b=document.createElement("option");b.setAttribute("value",a.id);mxUtils.write(b,a.title+" ("+mxResources.get(d)+")");z.appendChild(b)})(t[y]);l.appendChild(z);mxEvent.addListener(z,"change",function(d){""!=z.value&&a.loadFile(z.value)})}else l.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(t=document.createElement("div"),t.style.marginBottom="10px",t.style.padding="18px 0px 6px 0px",
 y=document.createElement("a"),y.style.cursor="pointer",y.style.fontSize="12px",y.style.color="gray",y.style.userSelect="none",mxUtils.write(y,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(y,"click",function(){if(null==a.storageFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(){null!=d.files&&
-(a.hideDialog(),a.openFiles(d.files,!0),d.type="",d.type="file",d.value="")});d.style.display="none";document.body.appendChild(d);a.storageFileInputElt=d}a.storageFileInputElt.click()}),t.appendChild(y),l.appendChild(t),f.style.paddingBottom="4px");f.appendChild(l);mxEvent.addListener(u,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&
+(a.hideDialog(),a.openFiles(d.files,!0),d.type="",d.type="file",d.value="")});d.style.display="none";document.body.appendChild(d);a.storageFileInputElt=d}a.storageFileInputElt.click()}),t.appendChild(y),l.appendChild(t),f.style.paddingBottom="4px");f.appendChild(l);mxEvent.addListener(v,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&
 (p.style.padding="8px",p.style.fontSize="9pt",p.style.marginTop="-14px",p.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",k.appendChild(p))},5E3);this.container=k};StorageDialog.extended=!1;
 var SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";var c=a.addLanguageMenu(e,!0);null!=c&&(c.style.bottom="19px");c=null;c=a.getServiceCount();if(!a.isOffline()&&1<c){c=document.createElement("a");c.setAttribute("href","https://about.draw.io/support/");c.setAttribute("title",mxResources.get("help"));c.setAttribute("target","_blank");c.style.position="absolute";c.style.fontSize="12px";c.style.textDecoration="none";c.style.cursor="pointer";c.style.bottom="22px";
 c.style.left="26px";c.style.color="gray";var b=document.createElement("img");mxUtils.setOpacity(b,50);b.style.height="16px";b.style.width="16px";b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";c.appendChild(b);mxUtils.write(c,mxResources.get("help"));e.appendChild(c)}c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";b=document.createElement("img");
@@ -8602,28 +8601,28 @@ f.style.color="gray";mxUtils.write(f,a.formatFileSize(e.length));b.appendChild(f
 b.appendChild(d);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>e.length?(d.value=e,d.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)):(d.setAttribute("readonly","true"),d.value=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.style.right="32px";var g=null;!EmbedDialog.showPreviewOption||
 mxClient.IS_CHROMEAPP&&!l||navigator.standalone||!(l||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(g=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var b=5E5>e.length?d.value:e;if(null!=k)k(b);else if(l)try{var g=a.openLink(b);null!=g&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=b.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),
 c||500)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}else{var m=window.open(),m=null!=m?m.document:null;null!=m?(m.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),m.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),g.className="geBtn",f.appendChild(g));if(!l||7500<e.length){var m=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
-a.saveData("embed.txt","txt",e,"text/plain")});m.className="geBtn";f.appendChild(m)}if(l&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var n=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(d.value);a.openLink(b)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),m=document.createElement("img");m.setAttribute("src",Editor.facebookImage);m.setAttribute("width","18");m.setAttribute("height","18");m.setAttribute("border",
-"0");n.appendChild(m);n.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";f.appendChild(n)}7168>e.length&&(n=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(d.value);a.openLink(b)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),
+a.saveData("embed.txt","txt",e,"text/plain")});m.className="geBtn";f.appendChild(m)}if(l&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var n=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(d.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),m=document.createElement("img");m.setAttribute("src",Editor.facebookImage);m.setAttribute("width","18");m.setAttribute("height","18");m.setAttribute("border",
+"0");n.appendChild(m);n.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";f.appendChild(n)}7168>e.length&&(n=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(d.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),
 m=document.createElement("img"),m.setAttribute("src",Editor.tweetImage),m.setAttribute("width","18"),m.setAttribute("height","18"),m.setAttribute("border","0"),m.style.marginBottom="5px",n.appendChild(m),n.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",f.appendChild(n))}m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(m);n=mxUtils.button(mxResources.get("copy"),
 function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?m.className="geBtn gePrimaryBtn":(f.appendChild(n),n.className="geBtn gePrimaryBtn",m.className="geBtn"):(f.appendChild(g),m.className="geBtn",g.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};
 EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,e){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(B.checked&&""!=v.value){var d="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(v.value));null!=a&&(d+="&title="+encodeURIComponent(a));0<C.length&&(d+="&s="+C);""!=t.value&&"0"!=t.value&&(d+="&border="+t.value);""!=p.value&&(d+="&height="+p.value);d+="&pan="+(q.checked?"1":"0");d+="&zoom="+(u.checked?"1":"0");d+="&fit="+(x.checked?"1":"0");
-d+="&resize="+(A.checked?"1":"0");d+="&x0="+Number(n.value);d+="&y0="+g;k.mathEnabled&&(d+="&math=1");y.checked?d+="&edit=_blank":z.checked&&(d+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=d}else D.constructor==DriveFile||D.constructor==DropboxFile?(d="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=v.value?d+=encodeURIComponent(mxUtils.htmlEntities(v.value))+"&type=3":(d+=D.getHash().substring(1),d=D.constructor==DropboxFile?d+"&type=2":d+"&type=1"),null!=
+var GoogleSitesDialog=function(a,e){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(B.checked&&""!=u.value){var d="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(u.value));null!=a&&(d+="&title="+encodeURIComponent(a));0<C.length&&(d+="&s="+C);""!=t.value&&"0"!=t.value&&(d+="&border="+t.value);""!=p.value&&(d+="&height="+p.value);d+="&pan="+(q.checked?"1":"0");d+="&zoom="+(v.checked?"1":"0");d+="&fit="+(x.checked?"1":"0");
+d+="&resize="+(A.checked?"1":"0");d+="&x0="+Number(n.value);d+="&y0="+g;k.mathEnabled&&(d+="&math=1");y.checked?d+="&edit=_blank":z.checked&&(d+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=d}else D.constructor==DriveFile||D.constructor==DropboxFile?(d="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=u.value?d+=encodeURIComponent(mxUtils.htmlEntities(u.value))+"&type=3":(d+=D.getHash().substring(1),d=D.constructor==DropboxFile?d+"&type=2":d+"&type=1"),null!=
 a&&(d+="&title="+encodeURIComponent(a)),""!=p.value&&(a=parseInt(p.value)+parseInt(n.value),d+="&height="+a),m.value=d):m.value=""}var b=document.createElement("div"),k=a.editor.graph,f=k.getGraphBounds(),l=k.view.scale,d=Math.floor(f.x/l-k.view.translate.x),g=Math.floor(f.y/l-k.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
 b.appendChild(m);mxUtils.br(b);this.init=function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=d;b.appendChild(n);mxUtils.write(b,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type",
-"text");p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(f.height/l);b.appendChild(p);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","28");v.style.marginBottom="8px";v.style.marginTop="2px";v.style.width="410px";v.value=e||"";
-b.appendChild(v);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 q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";b.appendChild(q);mxUtils.write(b,mxResources.get("pan")+" ");var u=document.createElement("input");
-u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="8px";b.appendChild(u);mxUtils.write(b,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);b.appendChild(z);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,
+"text");p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(f.height/l);b.appendChild(p);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","28");u.style.marginBottom="8px";u.style.marginTop="2px";u.style.width="410px";u.value=e||"";
+b.appendChild(u);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 q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";b.appendChild(q);mxUtils.write(b,mxResources.get("pan")+" ");var v=document.createElement("input");
+v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);b.appendChild(z);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 A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";b.appendChild(A);mxUtils.write(b,mxResources.get("resize")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft=
-"8px";b.appendChild(B);mxUtils.write(b,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(q,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(v,"change",c);c();
+"8px";b.appendChild(B);mxUtils.write(b,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(u,"change",c);c();
 mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";f.appendChild(l);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,e,c){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 f=new Graph(e);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";f.cellRenderer.installCellOverlayListeners=
 function(a,d,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){d.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){d.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
 !1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var d=f.getDefaultParent(),g=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var e=f.getCellGeometry(a),m;p(function(){m=f.insertVertex(d,null,"Entry",e.x,e.y,80,30,"rounded=1;");g(m);f.view.refresh(m);
 f.insertEdge(d,null,"",a,m,l)},function(){f.scrollCellToVisible(m)})});b.addListener("pointerdown",function(a,d){var b=d.getProperty("event"),c=d.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var e=mxUtils.convertPoint(f.container,mxEvent.getClientX(b),mxEvent.getClientY(b));f.connectionHandler.start(c,e.x,e.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var m;try{m=f.insertVertex(d,null,"Start",
 0,0,80,30,"ellipse"),g(m)}finally{f.getModel().endUpdate()}var n;"horizontalTree"==c?(n=new mxCompactTreeLayout(f),n.edgeRouting=!1,n.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(n=new mxCompactTreeLayout(f,!1),n.edgeRouting=!1,n.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(n=new mxRadialTreeLayout(f,!1),n.edgeRouting=!1,n.levelDistance=80):"verticalFlow"==c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(n=new mxFastOrganicLayout(f,!1),n.forceConstant=80):"circle"==c&&(n=new mxCircleLayout(f));if(null!=n){var p=function(a,d){f.getModel().beginUpdate();try{null!=a&&a(),n.execute(f.getDefaultParent(),m)}catch(A){throw A;}finally{var b=new mxMorphing(f);b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=d&&d()}));b.startAnimation()}},v=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,d,b,c,e){v.apply(this,arguments);p()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(f.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);var q=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
+c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(n=new mxFastOrganicLayout(f,!1),n.forceConstant=80):"circle"==c&&(n=new mxCircleLayout(f));if(null!=n){var p=function(a,d){f.getModel().beginUpdate();try{null!=a&&a(),n.execute(f.getDefaultParent(),m)}catch(A){throw A;}finally{var b=new mxMorphing(f);b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=d&&d()}));b.startAnimation()}},u=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,d,b,c,e){u.apply(this,arguments);p()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(f.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&b.appendChild(t);var q=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
 var d=a.editor.graph.getFreeInsertPoint(),d=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),d.x,d.y),b=a.editor.graph.view,c=b.getBounds(d);c.x-=b.translate.x;c.y-=b.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(d);null!=e.parentNode&&(f.destroy(),e.parentNode.removeChild(e));a.hideDialog()});b.appendChild(q);q.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);
@@ -8637,12 +8636,12 @@ m.className="geBtn";a.editor.cancelFirst&&b.appendChild(m);var n=mxUtils.button(
 a.editor.graph,g="plantUmlTxt"==b?"txt":"plantUmlPng"==b?"png":"svg";a.generatePlantUmlImage(d,g,function(b,c,m){a.spinner.stop();var n=null;e.getModel().beginUpdate();try{n="txt"==g?a.insertAsPreText(b,f.x,f.y):e.insertVertex(null,null,null,f.x,f.y,c,m,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(b)+";"),e.setAttributeForCell(n,"plantUmlData",JSON.stringify({data:d,format:g},null,2))}finally{e.getModel().endUpdate()}null!=n&&(e.setSelectionCell(n),
 e.scrollCellToVisible(n))},function(d){a.handleError(d)})}}else if("mermaid"==b)a.spinner.spin(document.body,mxResources.get("inserting"))&&(e=a.editor.graph,a.generateMermaidImage(d,g,function(b,c,g){a.spinner.stop();var m=null;e.getModel().beginUpdate();try{m=e.insertVertex(null,null,null,f.x,f.y,c,g,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+b+";"),e.setAttributeForCell(m,"mermaidData",JSON.stringify({data:d,config:EditorUi.defaultMermaidConfig},null,2))}finally{e.getModel().endUpdate()}null!=
 m&&(e.setSelectionCell(m),e.scrollCellToVisible(m))},function(d){a.handleError(d)}));else if("table"==b){for(var m=null,n=[],k=0,p=0;p<c.length;p++){var l=mxUtils.trim(c[p]);if("create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),m=new mxCell(l,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;align=center;"),
-m.vertex=!0,n.push(m),l=a.editor.graph.getPreferredSizeForCell(t),null!=l&&(m.geometry.width=l.width+10);else if(null!=m&&")"==l.charAt(0))k+=m.geometry.width+40,m=null;else if("("!=l&&null!=m&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var v=l.toLowerCase().indexOf("primary key"),l=l.replace(/primary key/i,""),t=new mxCell(l,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;");
-t.vertex=!0;l=sb.cloneCell(t,0<v?"PK":"");l.connectable=!1;l.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;";l.geometry.width=30;l.geometry.height=26;t.insert(l);l=a.editor.graph.getPreferredSizeForCell(t);null!=l&&m.geometry.width<l.width+10&&(m.geometry.width=Math.min(220,l.width+10));m.insert(t);m.geometry.height+=26}}0<n.length&&(e=a.editor.graph,
+m.vertex=!0,n.push(m),l=a.editor.graph.getPreferredSizeForCell(t),null!=l&&(m.geometry.width=l.width+10);else if(null!=m&&")"==l.charAt(0))k+=m.geometry.width+40,m=null;else if("("!=l&&null!=m&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var u=l.toLowerCase().indexOf("primary key"),l=l.replace(/primary key/i,""),t=new mxCell(l,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;");
+t.vertex=!0;l=sb.cloneCell(t,0<u?"PK":"");l.connectable=!1;l.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;";l.geometry.width=30;l.geometry.height=26;t.insert(l);l=a.editor.graph.getPreferredSizeForCell(t);null!=l&&m.geometry.width<l.width+10&&(m.geometry.width=Math.min(220,l.width+10));m.insert(t);m.geometry.height+=26}}0<n.length&&(e=a.editor.graph,
 p=e.view,c=e.getGraphBounds(),e.setSelectionCells(e.importCells(n,Math.ceil(Math.max(0,c.x/p.scale-p.translate.x)+4*e.gridSize),Math.ceil(Math.max(0,(c.y+c.height)/p.scale-p.translate.y)+4*e.gridSize))),e.scrollCellToVisible(e.getSelectionCell()))}else if("list"==b){if(0<c.length){e=a.editor.graph;t=null;n=[];for(p=m=0;p<c.length;p++)";"!=c[p].charAt(0)&&(0==c[p].length?t=null:null==t?(t=new mxCell(c[p],new mxGeometry(m,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
 t.vertex=!0,n.push(t),l=e.getPreferredSizeForCell(t),null!=l&&t.geometry.width<l.width+10&&(t.geometry.width=l.width+10),m+=t.geometry.width+40):"--"==c[p]?(l=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;"),l.vertex=!0,t.geometry.height+=l.geometry.height,t.insert(l)):0<c[p].length&&(k=new mxCell(c[p],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;"),
 k.vertex=!0,l=e.getPreferredSizeForCell(k),null!=l&&k.geometry.width<l.width&&(k.geometry.width=l.width),t.geometry.width=Math.max(t.geometry.width,k.geometry.width),t.geometry.height+=k.geometry.height,t.insert(k)));if(0<n.length){e.getModel().beginUpdate();try{n=e.importCells(n,f.x,f.y);l=[];for(p=0;p<n.length;p++)l.push(n[p]),l=l.concat(n[p].children);e.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{e.getModel().endUpdate()}e.setSelectionCells(n);e.scrollCellToVisible(e.getSelectionCell())}}}else{for(var t=
-function(a){var d=G[a];null==d&&(d=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),d.vertex=!0,G[a]=d,n.push(d));return d},G={},n=[],p=0;p<c.length;p++)if(";"!=c[p].charAt(0)){var E=c[p].split("->");if(2<=E.length){var v=t(E[0]),J=t(E[E.length-1]),E=new mxCell(2<E.length?E[1]:"",new mxGeometry);E.edge=!0;v.insertEdge(E,!0);J.insertEdge(E,!1);n.push(E)}}if(0<n.length){c=document.createElement("div");c.style.visibility="hidden";document.body.appendChild(c);e=new Graph(c);e.getModel().beginUpdate();
+function(a){var d=G[a];null==d&&(d=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),d.vertex=!0,G[a]=d,n.push(d));return d},G={},n=[],p=0;p<c.length;p++)if(";"!=c[p].charAt(0)){var E=c[p].split("->");if(2<=E.length){var u=t(E[0]),J=t(E[E.length-1]),E=new mxCell(2<E.length?E[1]:"",new mxGeometry);E.edge=!0;u.insertEdge(E,!0);J.insertEdge(E,!1);n.push(E)}}if(0<n.length){c=document.createElement("div");c.style.visibility="hidden";document.body.appendChild(c);e=new Graph(c);e.getModel().beginUpdate();
 try{n=e.importCells(n);for(p=0;p<n.length;p++)e.getModel().isVertex(n[p])&&(l=e.getPreferredSizeForCell(n[p]),n[p].geometry.width=Math.max(n[p].geometry.width,l.width),n[p].geometry.height=Math.max(n[p].geometry.height,l.height));m=new mxFastOrganicLayout(e);m.disableEdgeStyle=!1;m.forceConstant=120;m.execute(e.getDefaultParent());k=new mxParallelEdgeLayout(e);k.spacing=20;k.execute(e.getDefaultParent())}finally{e.getModel().endUpdate()}e.clearCellOverlays();l=[];a.editor.graph.getModel().beginUpdate();
 try{l=a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());e.destroy();c.parentNode.removeChild(c)}}}function k(){return"list"==d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":
 "mermaid"==d.value?"graph TD;\n  A--\x3eB;\n  A--\x3eC;\n  B--\x3eD;\n  C--\x3eD;":"table"==d.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==d.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":
@@ -8652,13 +8651,13 @@ try{l=a.editor.graph.importCells(e.getModel().getChildren(e.getDefaultParent()),
 c&&g.setAttribute("selected","selected");var m=document.createElement("option");m.setAttribute("value","plantUmlPng");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var n=document.createElement("option");n.setAttribute("value","plantUmlTxt");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(d.appendChild(g),d.appendChild(m),d.appendChild(n));var p=k();l.value=
 p;e.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var d=new FileReader;d.onload=function(a){l.value=a.target.result};d.readAsText(a)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var a=k();if(0==l.value.length||l.value==p)p=a,l.value=p});
 a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("close"),function(){l.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});g.className="geBtn";a.editor.cancelFirst&&e.appendChild(g);m=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();
-b(l.value,d.value)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);this.container=e},NewDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,v,t,q,u,z){function y(){var a=!0;if(null!=O)for(;J<O.length&&(a||0!=mxUtils.mod(J,30));){var d=O[J++],d=B(d.url,d.libs,d.title,d.tooltip?d.tooltip:d.title,d.select,d.imgUrl,d.info,d.onClick,d.preview,d.noImg,d.clibs);a&&d.click();a=!1}}function A(){if(Z)c||a.hideDialog(),t(Z,aa,E.value);else if(b)c||a.hideDialog(),b(V,E.value);else{var d=
-E.value;null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,V,null!=W&&0<W.length?W:null,null,function(){a.hideDialog()},null,b,null,null!=S&&0<S.length?S:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,c,e,m,f){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");H.removeAttribute("disabled");V=b;W=c;S=f;X=a;Z=e;aa=m;X.style.backgroundColor=d;X.style.border=g}function B(d,b,c,e,g,m,f,n,k,p,l){var v=document.createElement("div");
-v.className="geTemplate";v.style.height=N+"px";v.style.width=ga+"px";null!=c?v.setAttribute("title",mxResources.get(c,null,c)):null!=e&&0<e.length&&v.setAttribute("title",e);if(null!=m)v.style.backgroundImage="url("+m+")",v.style.backgroundSize="contain",v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",mxEvent.addListener(v,"click",function(a){x(v,null,null,d,f,l)}),mxEvent.addListener(v,"dblclick",function(a){A()});else if(!p&&null!=d&&0<d.length){e=k||TEMPLATE_PATH+
-"/"+d.substring(0,d.length-4)+".png";v.style.backgroundImage="url("+e+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";null!=c&&(v.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
-(N-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var u=!1;mxEvent.addListener(v,"click",function(c){H.setAttribute("disabled","disabled");v.style.backgroundColor="transparent";v.style.border="1px solid transparent";c=d;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;K.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){K.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(v,a.getText(),b,null,null,l),u&&A())}))});
-mxEvent.addListener(v,"dblclick",function(a){u=!0})}else v.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(N-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",g&&x(v),null!=n?mxEvent.addListener(v,"click",n):(mxEvent.addListener(v,"click",function(a){x(v,null,
-null,d,f)}),mxEvent.addListener(v,"dblclick",function(a){A()}));P.appendChild(v);return v}function C(){ta&&(ta=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(d,mxResources.get("custom"));Q.appendChild(d);for(var b in Y){var c=document.createElement("div"),d=b,e=Y[b];
+b(l.value,d.value)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);this.container=e},NewDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,u,t,q,v,z){function y(){var a=!0;if(null!=O)for(;J<O.length&&(a||0!=mxUtils.mod(J,30));){var d=O[J++],d=B(d.url,d.libs,d.title,d.tooltip?d.tooltip:d.title,d.select,d.imgUrl,d.info,d.onClick,d.preview,d.noImg,d.clibs);a&&d.click();a=!1}}function A(){if(Z)c||a.hideDialog(),t(Z,aa,E.value);else if(b)c||a.hideDialog(),b(V,E.value);else{var d=
+E.value;null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,V,null!=W&&0<W.length?W:null,null,function(){a.hideDialog()},null,b,null,null!=S&&0<S.length?S:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,c,e,m,f){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");H.removeAttribute("disabled");V=b;W=c;S=f;X=a;Z=e;aa=m;X.style.backgroundColor=d;X.style.border=g}function B(d,b,c,e,g,m,f,n,p,k,l){var u=document.createElement("div");
+u.className="geTemplate";u.style.height=N+"px";u.style.width=ga+"px";null!=c?u.setAttribute("title",mxResources.get(c,null,c)):null!=e&&0<e.length&&u.setAttribute("title",e);if(null!=m)u.style.backgroundImage="url("+m+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){x(u,null,null,d,f,l)}),mxEvent.addListener(u,"dblclick",function(a){A()});else if(!k&&null!=d&&0<d.length){e=p||TEMPLATE_PATH+
+"/"+d.substring(0,d.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=c&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
+(N-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var v=!1;mxEvent.addListener(u,"click",function(c){H.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";c=d;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;K.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){K.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(u,a.getText(),b,null,null,l),v&&A())}))});
+mxEvent.addListener(u,"dblclick",function(a){v=!0})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(N-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",g&&x(u),null!=n?mxEvent.addListener(u,"click",n):(mxEvent.addListener(u,"click",function(a){x(u,null,
+null,d,f)}),mxEvent.addListener(u,"dblclick",function(a){A()}));P.appendChild(u);return u}function C(){ta&&(ta=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(d,mxResources.get("custom"));Q.appendChild(d);for(var b in Y){var c=document.createElement("div"),d=b,e=Y[b];
 18<d.length&&(d=d.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",d+" ("+e.length+")");mxUtils.write(c,c.getAttribute("title"));null!=m&&(c.style.padding=m);Q.appendChild(c);(function(d,b){mxEvent.addListener(c,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",J=0,O=Y[d],M=null,y())})})(b,
 c)}d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(d,"draw.io");Q.appendChild(d)}for(b in R)c=document.createElement("div"),d=mxResources.get(b),e=R[b],null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1)),18<d.length&&(d=d.substring(0,18)+"&hellip;"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;",
 c.setAttribute("title",d+" ("+e.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=m&&(c.style.padding=m),Q.appendChild(c),null==a&&0<e.length&&(a=c,a.style.backgroundColor=l,O=e),function(d,b){mxEvent.addListener(c,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",J=0,O=R[d],M=null,y())})}(b,c);y()}c=null!=c?c:!0;k=null!=k?k:!1;l=null!=l?l:"#ebf2f9";d=null!=d?d:"dark"==uiTheme?"transparent":"#e6eff8";g=null!=g?g:"dark"==uiTheme?
@@ -8666,23 +8665,23 @@ c.setAttribute("title",d+" ("+e.length+")"),mxUtils.write(c,c.getAttribute("titl
 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_GITLAB?IMAGE_PATH+"/gitlab-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&&c&&F.appendChild(G);c&&mxUtils.write(F,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
 mxResources.get("filename"))+":");G=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?G=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?G=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?G=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?G=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?G=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(G=a.trello.extension);var E=document.createElement("input");E.setAttribute("value",a.defaultFilename+
 G);E.style.marginLeft="10px";E.style.width=e?"144px":"284px";this.init=function(){c&&(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?E.select():document.execCommand("selectAll",!1,null))};c&&(F.appendChild(E),null!=a.editor.diagramFileTypes&&(G=FilenameDialog.createFileTypes(a,E,a.editor.diagramFileTypes),G.style.marginLeft="6px",G.style.width=e?"80px":"140px",F.appendChild(G)),null!=a.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(a,E,a.editor.fileExtensions),
-G.style.marginTop="12px",F.appendChild(G)));var F=!1,J=0,K=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}),H=mxUtils.button(u||mxResources.get("create"),function(){H.setAttribute("disabled","disabled");A();H.removeAttribute("disabled")});H.className="geBtn gePrimaryBtn";if(p||v){var L=[],M=null,I=null,U=null,T=function(a){H.setAttribute("disabled","disabled");for(var d=0;d<L.length;d++)L[d].className=d==a?"geBtn gePrimaryBtn":
-"geBtn"},F=!0;u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.height="30px";D.appendChild(u);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";P.style.left="160px";T(0);P.scrollTop=0;P.innerHTML="";J=0;M!=O&&(O=M,R=I,da=U,Q.innerHTML="",C(),M=null)});L.push(G);u.appendChild(G);var ca=function(a){Q.style.display="none";P.style.left="30px";T(a?-1:1);null==M&&(M=O);P.scrollTop=0;P.innerHTML="";K.spin(P);var d=function(a,d,b){J=0;K.stop();
-O=a;b=b||{};var c=0,e;for(e in b)c+=b[e].length;if(d)P.innerHTML=d;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){Q.style.display="";P.style.left="160px";Q.innerHTML="";da=0;R={"draw.io":a};for(e in b)R[e]=b[e];C()}else y()};a?v(ba.value,d):p(d)};p&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ca()}),u.appendChild(G),L.push(G));if(v){G=document.createElement("span");G.style.marginLeft=
-"10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");u.appendChild(G);var ba=document.createElement("input");ba.style.marginRight="10px";ba.style.marginLeft="10px";ba.style.width="220px";mxEvent.addListener(ba,"keypress",function(a){13==a.keyCode&&ca(!0)});u.appendChild(ba);G=mxUtils.button(mxResources.get("search"),function(){ca(!0)});G.className="geBtn";u.appendChild(G)}T(0)}var W=null,S=null,V=null,X=null,Z=null,aa=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";
-P.style.position="absolute";P.style.left="160px";P.style.right="34px";u=(c?72:40)+(F?30:0);P.style.top=u+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+u+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var N=140,ga=140,R={},Y={},da=0,ta=!0;R.basic=[{title:"blankDiagram",select:!0}];var O=R.basic;if(!e){var ha=function(){mxUtils.get(ea,
+G.style.marginTop="12px",F.appendChild(G)));var F=!1,J=0,K=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}),H=mxUtils.button(v||mxResources.get("create"),function(){H.setAttribute("disabled","disabled");A();H.removeAttribute("disabled")});H.className="geBtn gePrimaryBtn";if(p||u){var L=[],M=null,I=null,U=null,T=function(a){H.setAttribute("disabled","disabled");for(var d=0;d<L.length;d++)L[d].className=d==a?"geBtn gePrimaryBtn":
+"geBtn"},F=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";P.style.left="160px";T(0);P.scrollTop=0;P.innerHTML="";J=0;M!=O&&(O=M,R=I,da=U,Q.innerHTML="",C(),M=null)});L.push(G);v.appendChild(G);var ca=function(a){Q.style.display="none";P.style.left="30px";T(a?-1:1);null==M&&(M=O);P.scrollTop=0;P.innerHTML="";K.spin(P);var d=function(a,d,b){J=0;K.stop();
+O=a;b=b||{};var c=0,e;for(e in b)c+=b[e].length;if(d)P.innerHTML=d;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){Q.style.display="";P.style.left="160px";Q.innerHTML="";da=0;R={"draw.io":a};for(e in b)R[e]=b[e];C()}else y()};a?u(ba.value,d):p(d)};p&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ca()}),v.appendChild(G),L.push(G));if(u){G=document.createElement("span");G.style.marginLeft=
+"10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(G);var ba=document.createElement("input");ba.style.marginRight="10px";ba.style.marginLeft="10px";ba.style.width="220px";mxEvent.addListener(ba,"keypress",function(a){13==a.keyCode&&ca(!0)});v.appendChild(ba);G=mxUtils.button(mxResources.get("search"),function(){ca(!0)});G.className="geBtn";v.appendChild(G)}T(0)}var W=null,S=null,V=null,X=null,Z=null,aa=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";
+P.style.position="absolute";P.style.left="160px";P.style.right="34px";v=(c?72:40)+(F?30:0);P.style.top=v+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var N=140,ga=140,R={},Y={},da=0,ta=!0;R.basic=[{title:"blankDiagram",select:!0}];var O=R.basic;if(!e){var ha=function(){mxUtils.get(ea,
 function(a){if(!fa){fa=!0;a=a.getXml().documentElement.firstChild;for(var d={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var b=a.getAttribute("name"),c=a.getElementsByTagName("add"),e=[],g=0;g<c.length;g++)e.push(encodeURIComponent(mxUtils.getTextContent(c[g])));null!=b&&0<e.length&&(d[b]=e.join(";"))}else b=a.getAttribute("url"),null!=b&&(c=a.getAttribute("section"),null==c&&(c=b.indexOf("/"),c=b.substring(0,c)),b=R[c],null==b&&(b=[],R[c]=b),c=a.getAttribute("clibs"),
 null!=d[c]&&(c=d[c]),b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}K.stop();C()}})};D.appendChild(Q);D.appendChild(P);var fa=!1,ea=n;/^https?:\/\//.test(ea)&&!a.editor.isCorsEnabledForUrl(ea)&&(ea=PROXY_URL+"?url="+encodeURIComponent(ea));K.spin(P);null!=z?z(function(a,d){Y=a;U=da=d;ha()},ha):ha();I=R}mxEvent.addListener(E,"keypress",function(d){a.dialog.container.firstChild==
 D&&13==d.keyCode&&A()});n=document.createElement("div");n.style.marginTop=e?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";e||a.isOffline()||!c||null!=b||k||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",n.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});z.className=
 "geBtn";!a.editor.cancelFirst||k&&null==f||n.appendChild(z);e||"1"==urlParams.embed||k||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var d=new FilenameDialog(a,"",mxResources.get("create"),function(d){null!=d&&0<d.length&&(d=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(E.value)+"&create="+encodeURIComponent(d)),null==a.getCurrentFile()?window.location.href=d:window.openWindow(d))},mxResources.get("url"));a.showDialog(d.container,300,80,!0,!0);d.init()}),
 e.className="geBtn",n.appendChild(e));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var d=document.createElement("input");d.setAttribute("multiple","multiple");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(b){a.openFiles(d.files,!0);d.value=""});d.style.display="none";document.body.appendChild(d);a.newDlgFileInputElt=d}a.newDlgFileInputElt.click()}),q.className="geBtn",n.appendChild(q));n.appendChild(H);a.editor.cancelFirst||
-null!=b||k&&null==f||n.appendChild(z);D.appendChild(n);this.container=D},CreateDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,v,t,q,u,z){function y(d,b,c,g){function m(){mxEvent.addListener(f,"click",function(){var d=c;if(l){var b=B.value,g=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>g){var d=null!=d?d:F.value,m="";d==App.MODE_GOOGLE?m=a.drive.extension:d==App.MODE_GITHUB?m=a.gitHub.extension:d==App.MODE_GITLAB?m=a.gitLab.extension:d==App.MODE_TRELLO?m=a.trello.extension:d==App.MODE_DROPBOX?m=a.dropbox.extension:
+null!=b||k&&null==f||n.appendChild(z);D.appendChild(n);this.container=D},CreateDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,u,t,q,v,z){function y(d,b,c,g){function m(){mxEvent.addListener(f,"click",function(){var d=c;if(l){var b=B.value,g=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>g){var d=null!=d?d:F.value,m="";d==App.MODE_GOOGLE?m=a.drive.extension:d==App.MODE_GITHUB?m=a.gitHub.extension:d==App.MODE_GITLAB?m=a.gitLab.extension:d==App.MODE_TRELLO?m=a.trello.extension:d==App.MODE_DROPBOX?m=a.dropbox.extension:
 d==App.MODE_ONEDRIVE?m=a.oneDrive.extension:d==App.MODE_DEVICE&&(m=".drawio");0<=g&&(b=b.substring(0,g));B.value=b+m}}A(c)})}var f=document.createElement("a");f.style.overflow="hidden";var n=document.createElement("img");n.src=d;n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.width="60px";n.style.height="60px";n.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding=
-"8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(n);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var k=document.createElement("div");f.appendChild(k);mxUtils.write(k,b);if(null!=g&&null==a[g]){n.style.visibility="hidden";mxUtils.setOpacity(k,10);var v=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});v.spin(f);var u=window.setTimeout(function(){null==
-a[g]&&(v.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(u),mxUtils.setOpacity(k,100),n.style.visibility="",v.stop(),m())}))}else m();C.appendChild(f);++D==p&&(mxUtils.br(C),D=0)}function A(d){var b=B.value;if(null==d||null!=b&&0<b.length)z&&a.hideDialog(),c(b,d,B)}l=null!=l?l:!0;d=null!=d?d:!0;p=null!=p?p:4;z=null!=z?z:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var x=
+"8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(n);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var k=document.createElement("div");f.appendChild(k);mxUtils.write(k,b);if(null!=g&&null==a[g]){n.style.visibility="hidden";mxUtils.setOpacity(k,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(f);var x=window.setTimeout(function(){null==
+a[g]&&(u.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(x),mxUtils.setOpacity(k,100),n.style.visibility="",u.stop(),m())}))}else m();C.appendChild(f);++D==p&&(mxUtils.br(C),D=0)}function A(d){var b=B.value;if(null==d||null!=b&&0<b.length)z&&a.hideDialog(),c(b,d,B)}l=null!=l?l:!0;d=null!=d?d:!0;p=null!=p?p:4;z=null!=z?z:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var x=
 document.createElement("h2");mxUtils.write(x,k||mxResources.get("create"));x.style.marginTop="0px";x.style.marginBottom="24px";f.appendChild(x);mxUtils.write(f,mxResources.get("filename")+":");var B=document.createElement("input");B.setAttribute("value",e);B.style.width="200px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",
-!1,null)};f.appendChild(B);null!=u&&(null!=a.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(a,B,a.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",f.appendChild(k)),f.appendChild(FilenameDialog.createTypeHint(a,B,u)));null==v||null==t||"image/"!=t.substring(0,6)||"image/svg"==t.substring(0,9)&&!mxClient.IS_SVG||(B.style.width="160px",u=document.createElement("img"),v=q?v:btoa(unescape(encodeURIComponent(v))),u.setAttribute("src","data:"+t+";base64,"+v),u.style.position=
-"absolute",u.style.top="70px",u.style.right="100px",u.style.maxWidth="120px",u.style.maxHeight="80px",mxUtils.setPrefixedStyle(u.style,"transform","translate(50%,-50%)"),f.appendChild(u),g&&Editor.popupsAllowed&&(u.style.cursor="pointer",mxEvent.addGestureListeners(u,null,null,function(){A("_blank")})));mxUtils.br(f);var C=document.createElement("div");C.style.textAlign="center";var D=0;C.style.marginTop="6px";f.appendChild(C);var F=document.createElement("select");F.style.marginLeft="10px";a.isOfflineApp()||
+!1,null)};f.appendChild(B);null!=v&&(null!=a.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(a,B,a.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",f.appendChild(k)),f.appendChild(FilenameDialog.createTypeHint(a,B,v)));null==u||null==t||"image/"!=t.substring(0,6)||"image/svg"==t.substring(0,9)&&!mxClient.IS_SVG||(B.style.width="160px",v=document.createElement("img"),u=q?u:btoa(unescape(encodeURIComponent(u))),v.setAttribute("src","data:"+t+";base64,"+u),v.style.position=
+"absolute",v.style.top="70px",v.style.right="100px",v.style.maxWidth="120px",v.style.maxHeight="80px",mxUtils.setPrefixedStyle(v.style,"transform","translate(50%,-50%)"),f.appendChild(v),g&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(){A("_blank")})));mxUtils.br(f);var C=document.createElement("div");C.style.textAlign="center";var D=0;C.style.marginTop="6px";f.appendChild(C);var F=document.createElement("select");F.style.marginLeft="10px";a.isOfflineApp()||
 a.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(t,mxResources.get("googleDrive")),F.appendChild(t),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(t,mxResources.get("oneDrive")),F.appendChild(t),a.mode==App.MODE_ONEDRIVE&&
 t.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(t,mxResources.get("dropbox")),F.appendChild(t),a.mode==App.MODE_DROPBOX&&t.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(t=document.createElement("option"),
 t.setAttribute("value",App.MODE_GITHUB),mxUtils.write(t,mxResources.get("github")),F.appendChild(t),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITLAB),mxUtils.write(t,mxResources.get("gitlab")),F.appendChild(t),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(t=document.createElement("option"),t.setAttribute("value",
@@ -8699,24 +8698,24 @@ mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(d)):(
 function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(d){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<d.dataTransfer.files.length)a.importFiles(d.dataTransfer.files,0,0,a.maxImageSize,function(a,d,b,c,e,g,m,f){n(a,
 f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!mxEvent.isControlDown(d),null,null,!0);else if(0<=mxUtils.indexOf(d.dataTransfer.types,"text/uri-list")){var b=d.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(b)&&n(decodeURIComponent(b))}d.stopPropagation();d.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";c.style.textAlign="center";e=mxUtils.button(mxResources.get("cancel"),
 function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&c.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&&(g.value=a.url));g.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type","file");mxEvent.addListener(p,"change",function(d){null!=
-p.files&&(a.importFiles(p.files,0,0,a.maxImageSize,function(a,d,b,c,e,g){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!0),p.type="",p.type="file",p.value="")});p.style.display="none";document.body.appendChild(p);a.imgDlgFileInputElt=p}var v=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});v.className="geBtn";c.appendChild(v)}document.createElement("canvas").getContext&&"data:image/"==g.value.substring(0,
-11)&&"data:image/svg"!=g.value.substring(0,14)&&(v=mxUtils.button(mxResources.get("crop"),function(){var d=new CropImageDialog(a,g.value,function(a){g.value=a});a.showDialog(d.container,300,380,!0,!0);d.init()}),v.className="geBtn",c.appendChild(v));mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&n(g.value)});v=mxUtils.button(mxResources.get("apply"),function(){n(g.value)});v.className="geBtn gePrimaryBtn";c.appendChild(v);a.editor.cancelFirst||c.appendChild(e);Graph.fileSupport&&(c.style.marginTop=
+p.files&&(a.importFiles(p.files,0,0,a.maxImageSize,function(a,d,b,c,e,g){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!0),p.type="",p.type="file",p.value="")});p.style.display="none";document.body.appendChild(p);a.imgDlgFileInputElt=p}var u=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});u.className="geBtn";c.appendChild(u)}document.createElement("canvas").getContext&&"data:image/"==g.value.substring(0,
+11)&&"data:image/svg"!=g.value.substring(0,14)&&(u=mxUtils.button(mxResources.get("crop"),function(){var d=new CropImageDialog(a,g.value,function(a){g.value=a});a.showDialog(d.container,300,380,!0,!0);d.init()}),u.className="geBtn",c.appendChild(u));mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&n(g.value)});u=mxUtils.button(mxResources.get("apply"),function(){n(g.value)});u.className="geBtn gePrimaryBtn";c.appendChild(u);a.editor.cancelFirst||c.appendChild(e);Graph.fileSupport&&(c.style.marginTop=
 "120px",d.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",d.style.backgroundPosition="center 65%",d.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")),d.appendChild(e));d.appendChild(c);this.container=d},LinkDialog=function(a,e,c,b,k){function f(a,d,b){b=mxUtils.button("",b);b.className=
 "geBtn";b.setAttribute("title",d);d=document.createElement("img");d.style.height="26px";d.style.width="26px";d.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";b.appendChild(d);z.appendChild(b)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var 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 g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="100%";g.style.boxSizing="border-box";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";var m=document.createElement("div");m.setAttribute("title",mxResources.get("reset"));
 m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display=mxClient.IS_VML?"inline":"inline-block";m.style.top=(mxClient.IS_VML?0:3)+"px";m.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(m,"click",function(){g.value="";g.focus()});var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name",
-"current-linkdialog");var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","current-linkdialog");var v=document.createElement("select");v.style.width="100%";if(k&&null!=a.pages){null!=e&&"data:page/id,"==e.substring(0,13)?(p.setAttribute("checked","checked"),p.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);
-d.appendChild(g);d.appendChild(m);mxUtils.br(d);d.appendChild(p);k=!1;for(m=0;m<a.pages.length;m++){var t=document.createElement("option");mxUtils.write(t,a.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));t.setAttribute("value","data:page/id,"+a.pages[m].getId());e==t.getAttribute("value")&&(t.setAttribute("selected","selected"),k=!0);v.appendChild(t)}if(!k&&p.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");
-q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");v.appendChild(q);mxEvent.addListener(v,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}d.appendChild(v)}else g.setAttribute("value",e),d.appendChild(g),d.appendChild(m);l.appendChild(d);var u=mxUtils.button(c,function(){a.hideDialog();b(p.checked?"pageNotFound"!==v.value?v.value:e:g.value,LinkDialog.selectedDocs)});u.style.verticalAlign="middle";u.className="geBtn gePrimaryBtn";this.init=
-function(){p.checked?v.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(v,"focus",function(){n.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(g,"focus",function(){p.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var d=l.parentNode,b=null;mxEvent.addListener(d,"dragleave",function(a){null!=
+"current-linkdialog");var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","current-linkdialog");var u=document.createElement("select");u.style.width="100%";if(k&&null!=a.pages){null!=e&&"data:page/id,"==e.substring(0,13)?(p.setAttribute("checked","checked"),p.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);
+d.appendChild(g);d.appendChild(m);mxUtils.br(d);d.appendChild(p);k=!1;for(m=0;m<a.pages.length;m++){var t=document.createElement("option");mxUtils.write(t,a.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));t.setAttribute("value","data:page/id,"+a.pages[m].getId());e==t.getAttribute("value")&&(t.setAttribute("selected","selected"),k=!0);u.appendChild(t)}if(!k&&p.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");
+q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");u.appendChild(q);mxEvent.addListener(u,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}d.appendChild(u)}else g.setAttribute("value",e),d.appendChild(g),d.appendChild(m);l.appendChild(d);var v=mxUtils.button(c,function(){a.hideDialog();b(p.checked?"pageNotFound"!==u.value?u.value:e:g.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=
+function(){p.checked?u.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(u,"focus",function(){n.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(g,"focus",function(){p.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var d=l.parentNode,b=null;mxEvent.addListener(d,"dragleave",function(a){null!=
 b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(c){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(d));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),n.setAttribute("checked",
-"checked"),n.checked=!0,u.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");z.style.marginTop="20px";z.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";z.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign=
+"checked"),n.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");z.style.marginTop="20px";z.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";z.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign=
 "middle";c.className="geBtn";a.editor.cancelFirst&&z.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var d=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?d="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(d="https://drive.google.com/#folders/"+a.docs[0].id);
 g.value=d;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&f(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 d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
 b=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(b).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED);a.linkPicker=d.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});
 "undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&f(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){g.value=a[0].link;g.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,d){g.value=d.value[0].webUrl;g.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=
 a){a=a.split("/");var d=a[0],b=a[1],c=a[2];a=a.slice(3,a.length).join("/");g.value="https://github.com/"+d+"/"+b+"/blob/"+c+"/"+a;g.focus()}})});null!=a.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var d=a[0],b=a[1],c=a[2];a=a.slice(3,a.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+d+"/"+b+"/blob/"+c+"/"+a;g.focus()}})});mxEvent.addListener(g,"keypress",function(d){13==d.keyCode&&(a.hideDialog(),b(p.checked?
-v.value:g.value,LinkDialog.selectedDocs))});z.appendChild(u);a.editor.cancelFirst||z.appendChild(c);l.appendChild(z);this.container=l},FeedbackDialog=function(a,e,c,b){var k=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";k.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));k.appendChild(f);
+u.value:g.value,LinkDialog.selectedDocs))});z.appendChild(v);a.editor.cancelFirst||z.appendChild(c);l.appendChild(z);this.container=l},FeedbackDialog=function(a,e,c,b){var k=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";k.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));k.appendChild(f);
 var l=document.createElement("input");l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="600px";var d=mxUtils.button(mxResources.get("sendMessage"),function(){var d=n.value+(m.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;d.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(l.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+d),function(d){a.spinner.stop();200<=d.getStatus()&&299>=d.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});
 d.className="geBtn gePrimaryBtn";if(!c){d.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\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(l,"change",function(){0<l.value.length&&0<g.test(l.value)?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled")});mxEvent.addListener(l,"keyup",function(){0<l.value.length&&g.test(l.value)?d.removeAttribute("disabled"):d.setAttribute("disabled",
@@ -8725,42 +8724,42 @@ mxUtils.write(f,mxResources.get("feedback"));k.appendChild(f);var n=document.cre
 c.appendChild(f));k.appendChild(c);this.container=k};FeedbackDialog.maxAttachmentSize=1E6;
 var RevisionDialog=function(a,e,c){var b=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="0px";mxUtils.write(k,mxResources.get("revisionHistory"));b.appendChild(k);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";b.appendChild(f);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height=
 "376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);b.appendChild(l);var d=new Graph(l);d.setTooltips(!1);d.setEnabled(!1);d.setPanning(!0);d.panningHandler.ignoreCell=!0;d.panningHandler.useLeftButtonForPanning=!0;d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;var g=0,m=null,n=0,p=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=m&&null!=m[n]?m[n].getAttribute("name"):"pagenumber"==a?n+1:"pagecount"==a?null!=m?m.length:1:p.apply(this,arguments)};d.getLinkForCell=
-function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var v=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(),q=null,u=null,z=null,y=null,A=mxUtils.button("",function(){null!=z&&d.zoomIn()});A.className="geSprite geSprite-zoomin";
+function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var u=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(),q=null,v=null,z=null,y=null,A=mxUtils.button("",function(){null!=z&&d.zoomIn()});A.className="geSprite geSprite-zoomin";
 A.setAttribute("title",mxResources.get("zoomIn"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var x=mxUtils.button("",function(){null!=z&&d.zoomOut()});x.className="geSprite geSprite-zoomout";x.setAttribute("title",mxResources.get("zoomOut"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var B=mxUtils.button("",function(){null!=z&&
 (d.maxFitScale=8,d.fit(8),d.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var C=mxUtils.button("",function(){null!=z&&(d.zoomActual(),d.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled",
 "disabled");mxUtils.setOpacity(C,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var F=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var d=mxUtils.getXml(z.documentElement),b=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml"):(d=
 "undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(Graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});F.className="geBtn";F.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(d){a.spinner.stop();
 a.replaceFileData(y);a.hideDialog()},function(d){a.spinner.stop();a.editor.setStatus("");a.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.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 J=null;mxEvent.addListener(E,"change",function(a){null!=
-J&&(J(a),mxEvent.consume(a))});var K=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=c&&(K.style.display="none");var H=mxUtils.button(mxResources.get("show"),function(){null!=u&&a.openLink(u.getUrl(E.selectedIndex))});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled",
+J&&(J(a),mxEvent.consume(a))});var K=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=c&&(K.style.display="none");var H=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(E.selectedIndex))});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled",
 "disabled");null!=c&&(H.style.display="none",G.className="geBtn gePrimaryBtn");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.width="640px";k.style.textAlign="right";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.padding="2px";L.style.border="none";L.style.left="199px";L.style.top="442px";var M=null;if(null!=e&&0<e.length){l.style.cursor="move";var I=document.createElement("table");I.style.border=
-"1px solid lightGray";I.style.borderCollapse="collapse";I.style.borderSpacing="0px";I.style.width="100%";var U=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(g=mxUtils.indexOf(a.pages,a.currentPage));for(var ca=e.length-1;0<=ca;ca--){var ba=function(b){var c=new Date(b.modifiedDate),f=null;if(0<=c.getTime()){var k=function(e){v.stop();var k=mxUtils.parseXml(e),p=a.editor.extractGraphModel(k.documentElement,!0);if(null!=p){var u=function(a){null!=a&&
+"1px solid lightGray";I.style.borderCollapse="collapse";I.style.borderSpacing="0px";I.style.width="100%";var U=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(g=mxUtils.indexOf(a.pages,a.currentPage));for(var ca=e.length-1;0<=ca;ca--){var ba=function(b){var c=new Date(b.modifiedDate),f=null;if(0<=c.getTime()){var k=function(e){u.stop();var k=mxUtils.parseXml(e),p=a.editor.extractGraphModel(k.documentElement,!0);if(null!=p){var v=function(a){null!=a&&
 (a=q(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},q=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return a};E.style.display="none";E.innerHTML="";z=k;y=e;m=parseSelectFunction=null;n=0;if("mxfile"==p.nodeName){k=p.getElementsByTagName("diagram");m=[];for(e=0;e<k.length;e++)m.push(k[e]);n=
-Math.min(g,m.length-1);0<m.length&&u(m[n]);if(1<m.length)for(E.removeAttribute("disabled"),E.style.display="",e=0;e<m.length;e++)k=document.createElement("option"),mxUtils.write(k,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),k.setAttribute("value",e),e==n&&k.setAttribute("selected","selected"),E.appendChild(k);J=function(){try{var d=parseInt(E.value);n=g=d;u(m[d])}catch(Y){E.value=g,a.handleError(Y)}}}else q(p);e=b.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,
+Math.min(g,m.length-1);0<m.length&&v(m[n]);if(1<m.length)for(E.removeAttribute("disabled"),E.style.display="",e=0;e<m.length;e++)k=document.createElement("option"),mxUtils.write(k,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),k.setAttribute("value",e),e==n&&k.setAttribute("selected","selected"),E.appendChild(k);J=function(){try{var d=parseInt(E.value);n=g=d;v(m[d])}catch(Y){E.value=g,a.handleError(Y)}}}else q(p);e=b.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,
 20)+"...");D.innerHTML="";mxUtils.write(D,(null!=e?e+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());D.setAttribute("title",f.getAttribute("title"));A.removeAttribute("disabled");x.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),F.removeAttribute("disabled"),H.removeAttribute("disabled"),K.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(x,
 60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60)}else E.style.display="none",E.innerHTML="",D.innerHTML="",mxUtils.write(D,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var p=document.createElement("td");p.style.padding="6px";p.style.whiteSpace="nowrap";b==e[e.length-1]?mxUtils.write(p,mxResources.get("current")):c.toDateString()===T?mxUtils.write(p,c.toLocaleTimeString()):mxUtils.write(p,
-c.toLocaleDateString()+" "+c.toLocaleTimeString());f.appendChild(p);f.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){u!=b&&(v.stop(),null!=q&&(q.style.backgroundColor=""),u=b,q=f,q.style.backgroundColor="#ebf2f9",y=z=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
+c.toLocaleDateString()+" "+c.toLocaleTimeString());f.appendChild(p);f.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){v!=b&&(u.stop(),null!=q&&(q.style.backgroundColor=""),v=b,q=f,q.style.backgroundColor="#ebf2f9",y=z=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
 "..."),l.style.backgroundColor="#ffffff",d.getModel().clear(),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),
-v.spin(l),b.getXml(function(a){if(u==b)try{k(a)}catch(Q){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Q.message)}},function(a){v.stop();E.style.display="none";E.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){H.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);U.appendChild(f)}return f}(e[ca]);
+u.spin(l),b.getXml(function(a){if(v==b)try{k(a)}catch(Q){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Q.message)}},function(a){u.stop();E.style.display="none";E.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){H.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);U.appendChild(f)}return f}(e[ca]);
 null!=ba&&ca==e.length-1&&(M=ba)}I.appendChild(U);f.appendChild(I)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";
 L.appendChild(E);L.appendChild(A);L.appendChild(x);L.appendChild(C);L.appendChild(B);a.editor.cancelFirst?(k.appendChild(f),k.appendChild(F),k.appendChild(K),k.appendChild(G),k.appendChild(H)):(k.appendChild(F),k.appendChild(K),k.appendChild(G),k.appendChild(H),k.appendChild(f));b.appendChild(k);b.appendChild(L);b.appendChild(D);this.container=b},DraftDialog=function(a,e,c,b,k,f,l,d,g){var m=document.createElement("div"),n=document.createElement("div");n.style.marginTop="0px";n.style.whiteSpace="nowrap";
-n.style.overflow="auto";n.style.lineHeight="normal";mxUtils.write(n,e);m.appendChild(n);var p=document.createElement("select"),v=mxUtils.bind(this,function(){A=mxUtils.parseXml(g[p.value].data);x=a.editor.extractGraphModel(A.documentElement,!0);B=0;this.init()});if(null!=g){p.style.marginLeft="4px";for(e=0;e<g.length;e++){var t=document.createElement("option");t.setAttribute("value",e);var q=new Date(g[e].created),u=new Date(g[e].modified);mxUtils.write(t,q.toLocaleDateString()+" "+q.toLocaleTimeString()+
-" - "+(q.toDateString(),u.toDateString(),u.toLocaleDateString())+" "+u.toLocaleTimeString());p.appendChild(t)}n.appendChild(p);mxEvent.addListener(p,"change",v)}null==c&&(c=g[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";z.style.marginTop="10px";z.style.width="640px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);m.appendChild(z);var y=new Graph(z);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=
+n.style.overflow="auto";n.style.lineHeight="normal";mxUtils.write(n,e);m.appendChild(n);var p=document.createElement("select"),u=mxUtils.bind(this,function(){A=mxUtils.parseXml(g[p.value].data);x=a.editor.extractGraphModel(A.documentElement,!0);B=0;this.init()});if(null!=g){p.style.marginLeft="4px";for(e=0;e<g.length;e++){var t=document.createElement("option");t.setAttribute("value",e);var q=new Date(g[e].created),v=new Date(g[e].modified);mxUtils.write(t,q.toLocaleDateString()+" "+q.toLocaleTimeString()+
+" - "+(q.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(t)}n.appendChild(p);mxEvent.addListener(p,"change",u)}null==c&&(c=g[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";z.style.marginTop="10px";z.style.width="640px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);m.appendChild(z);var y=new Graph(z);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=
 !0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var A=mxUtils.parseXml(c),x=a.editor.extractGraphModel(A.documentElement,!0),B=0,C=null,D=y.getGlobalVariable;y.getGlobalVariable=function(a){return"page"==a&&null!=C&&null!=C[B]?C[B].getAttribute("name"):"pagenumber"==a?B+1:"pagecount"==a?null!=C?C.length:1:D.apply(this,arguments)};y.getLinkForCell=function(){return null};c=mxUtils.button("",function(){y.zoomIn()});c.className="geSprite geSprite-zoomin";
 c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);n=mxUtils.button("",function(){y.zoomOut()});n.className="geSprite geSprite-zoomout";n.setAttribute("title",mxResources.get("zoomOut"));n.style.outline="none";n.style.border="none";n.style.margin="2px";mxUtils.setOpacity(n,60);e=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));
 e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);t=mxUtils.button("",function(){y.zoomActual();y.center()});t.className="geSprite geSprite-actualsize";t.setAttribute("title",mxResources.get("actualSize"));t.style.outline="none";t.style.border="none";t.style.margin="2px";mxUtils.setOpacity(t,60);l=mxUtils.button(l||mxResources.get("discard"),function(){k.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),
-0<p.options.length?(p.value=p.options[0].value,v()):a.hideDialog(!0))})])});l.className="geBtn";var F=document.createElement("select");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[p.value])});f.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.width="640px";
-q.style.textAlign="right";u=document.createElement("div");u.className="geToolbarContainer";u.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var d=a.getAttribute("background");if(null==d||""==d||d==mxConstants.NONE)d="dark"==uiTheme?"transparent":"#ffffff";z.style.backgroundColor=d;(new mxCodec(a.ownerDocument)).decode(a,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}}function d(d){null!=
+0<p.options.length?(p.value=p.options[0].value,u()):a.hideDialog(!0))})])});l.className="geBtn";var F=document.createElement("select");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[p.value])});f.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.width="640px";
+q.style.textAlign="right";v=document.createElement("div");v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var d=a.getAttribute("background");if(null==d||""==d||d==mxConstants.NONE)d="dark"==uiTheme?"transparent":"#ffffff";z.style.backgroundColor=d;(new mxCodec(a.ownerDocument)).decode(a,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}}function d(d){null!=
 d&&(d=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(d))).documentElement));return d}mxEvent.addListener(F,"change",function(a){B=parseInt(F.value);d(C[B]);mxEvent.consume(a)});if("mxfile"==x.nodeName){var b=x.getElementsByTagName("diagram");C=[];for(var c=0;c<b.length;c++)C.push(b[c]);0<C.length&&d(C[B]);F.innerHTML="";if(1<C.length)for(F.style.display="",c=0;c<C.length;c++)b=document.createElement("option"),mxUtils.write(b,C[c].getAttribute("name")||mxResources.get("pageWithNumber",
-[c+1])),b.setAttribute("value",c),c==B&&b.setAttribute("selected","selected"),F.appendChild(b);else F.style.display="none"}else a(x)};u.appendChild(F);u.appendChild(c);u.appendChild(n);u.appendChild(t);u.appendChild(e);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");a.editor.cancelFirst?(q.appendChild(c),null!=d&&q.appendChild(d),q.appendChild(l),q.appendChild(f)):
-(q.appendChild(f),q.appendChild(l),null!=d&&q.appendChild(d),q.appendChild(c));m.appendChild(q);m.appendChild(u);this.container=m},FindWindow=function(a,e,c,b,k){function f(a,d,b){if("object"===typeof d.value&&null!=d.value.attributes){d=d.value.attributes;for(var c=0;c<d.length;c++)if("label"!=d[c].nodeName){var e=mxUtils.trim(d[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&e.substring(0,b.length)===b||null!=a&&a.test(e))return!0}}return!1}function l(d){var b=g.model.getDescendants(g.model.getRoot()),
-c=t.value.toLowerCase(),e=q.checked?new RegExp(c):null,k=null;m!=c&&(m=c,n=null,p=!1);var v=null==n;if(0<c.length){if(p){p=!1;for(var u,x=0;x<a.pages.length;x++)if(a.currentPage==a.pages[x]){u=x;break}d=(u+1)%a.pages.length;n=null;do p=!1,b=a.pages[d],g=a.createTemporaryGraph(g.getStylesheet()),a.updatePageRoot(b),g.model.setRoot(b.root),d=(d+1)%a.pages.length;while(!l(!0)&&d!=u);n&&(n=null,a.selectPage(b));p=!1;g=a.editor.graph;return l(!0)}for(x=0;x<b.length;x++){u=g.view.getState(b[x]);if(null!=
-u&&null!=u.cell.value&&(v||null==k)&&(g.model.isVertex(u.cell)||g.model.isEdge(u.cell))&&(g.isHtmlLabel(u.cell)?(y.innerHTML=g.getLabel(u.cell),label=mxUtils.extractTextWithWhitespace([y])):label=g.getLabel(u.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==e&&(label.substring(0,c.length)===c||f(e,u.cell,c))||null!=e&&(e.test(label)||f(e,u.cell,c))))if(v){k=u;break}else null==k&&(k=u);v=v||u==n}}if(null!=k){if(x==b.length&&z.checked)return n=null,p=!0,l(!0);
-n=k;g.scrollCellToVisible(n.cell);g.isEnabled()?g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!d&&z.checked)return p=!0,l(!0);g.isEnabled()&&g.clearSelection()}return 0==c.length||null!=k}var d=a.actions.get("find"),g=a.editor.graph,m=null,n=null,p=!1,v=document.createElement("div");v.style.userSelect="none";v.style.overflow="hidden";v.style.padding="10px";v.style.height="100%";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("find"));t.setAttribute("type",
-"text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width="200px";t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";v.appendChild(t);mxUtils.br(v);var q=document.createElement("input");q.setAttribute("id","geFindWinRegExChck");q.setAttribute("type","checkbox");q.style.marginRight="4px";v.appendChild(q);var u=document.createElement("label");u.setAttribute("for","geFindWinRegExChck");v.appendChild(u);mxUtils.write(u,mxResources.get("regularExpression"));v.appendChild(u);
-u=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");u.style.position="relative";u.style.marginLeft="6px";u.style.top="-1px";v.appendChild(u);mxUtils.br(v);var z=document.createElement("input");z.setAttribute("id","geFindWinAllPagesChck");z.setAttribute("type","checkbox");z.style.marginRight="4px";v.appendChild(z);u=document.createElement("label");u.setAttribute("for","geFindWinAllPagesChck");v.appendChild(u);mxUtils.write(u,mxResources.get("allPages"));v.appendChild(u);
-var y=document.createElement("div");mxUtils.br(v);u=mxUtils.button(mxResources.get("reset"),function(){t.value="";t.style.backgroundColor="";m=n=null;p=!1;t.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.style.marginLeft=(b-20-156)/2+"px";u.className="geBtn";v.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(x){a.handleError(x)}});u.setAttribute("title",mxResources.get("find")+
-" (Enter)");u.style.marginTop="6px";u.className="geBtn gePrimaryBtn";v.appendChild(u);mxEvent.addListener(t,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)d.funct();else if(m!=t.value.toLowerCase()||13==a.keyCode)try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(B){t.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(v,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(d.funct(),mxEvent.consume(b))});this.window=
-new mxWindow(mxResources.get("find"),v,e,c,b,k,!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.fit();this.window.isVisible()?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?z.removeAttribute("disabled"):(z.checked=!1,z.setAttribute("disabled",
+[c+1])),b.setAttribute("value",c),c==B&&b.setAttribute("selected","selected"),F.appendChild(b);else F.style.display="none"}else a(x)};v.appendChild(F);v.appendChild(c);v.appendChild(n);v.appendChild(t);v.appendChild(e);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");a.editor.cancelFirst?(q.appendChild(c),null!=d&&q.appendChild(d),q.appendChild(l),q.appendChild(f)):
+(q.appendChild(f),q.appendChild(l),null!=d&&q.appendChild(d),q.appendChild(c));m.appendChild(q);m.appendChild(v);this.container=m},FindWindow=function(a,e,c,b,k){function f(a,d,b){if("object"===typeof d.value&&null!=d.value.attributes){d=d.value.attributes;for(var c=0;c<d.length;c++)if("label"!=d[c].nodeName){var e=mxUtils.trim(d[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&e.substring(0,b.length)===b||null!=a&&a.test(e))return!0}}return!1}function l(d){var b=g.model.getDescendants(g.model.getRoot()),
+c=t.value.toLowerCase(),e=q.checked?new RegExp(c):null,k=null;m!=c&&(m=c,n=null,p=!1);var u=null==n;if(0<c.length){if(p){p=!1;for(var v,x=0;x<a.pages.length;x++)if(a.currentPage==a.pages[x]){v=x;break}d=(v+1)%a.pages.length;n=null;do p=!1,b=a.pages[d],g=a.createTemporaryGraph(g.getStylesheet()),a.updatePageRoot(b),g.model.setRoot(b.root),d=(d+1)%a.pages.length;while(!l(!0)&&d!=v);n&&(n=null,a.selectPage(b));p=!1;g=a.editor.graph;return l(!0)}for(x=0;x<b.length;x++){v=g.view.getState(b[x]);if(null!=
+v&&null!=v.cell.value&&(u||null==k)&&(g.model.isVertex(v.cell)||g.model.isEdge(v.cell))&&(g.isHtmlLabel(v.cell)?(y.innerHTML=g.getLabel(v.cell),label=mxUtils.extractTextWithWhitespace([y])):label=g.getLabel(v.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==e&&(label.substring(0,c.length)===c||f(e,v.cell,c))||null!=e&&(e.test(label)||f(e,v.cell,c))))if(u){k=v;break}else null==k&&(k=v);u=u||v==n}}if(null!=k){if(x==b.length&&z.checked)return n=null,p=!0,l(!0);
+n=k;g.scrollCellToVisible(n.cell);g.isEnabled()?g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!d&&z.checked)return p=!0,l(!0);g.isEnabled()&&g.clearSelection()}return 0==c.length||null!=k}var d=a.actions.get("find"),g=a.editor.graph,m=null,n=null,p=!1,u=document.createElement("div");u.style.userSelect="none";u.style.overflow="hidden";u.style.padding="10px";u.style.height="100%";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("find"));t.setAttribute("type",
+"text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width="200px";t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";u.appendChild(t);mxUtils.br(u);var q=document.createElement("input");q.setAttribute("id","geFindWinRegExChck");q.setAttribute("type","checkbox");q.style.marginRight="4px";u.appendChild(q);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");u.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));u.appendChild(v);
+v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";u.appendChild(v);mxUtils.br(u);var z=document.createElement("input");z.setAttribute("id","geFindWinAllPagesChck");z.setAttribute("type","checkbox");z.style.marginRight="4px";u.appendChild(z);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");u.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));u.appendChild(v);
+var y=document.createElement("div");mxUtils.br(u);v=mxUtils.button(mxResources.get("reset"),function(){t.value="";t.style.backgroundColor="";m=n=null;p=!1;t.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";u.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(x){a.handleError(x)}});v.setAttribute("title",mxResources.get("find")+
+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";u.appendChild(v);mxEvent.addListener(t,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)d.funct();else if(m!=t.value.toLowerCase()||13==a.keyCode)try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(B){t.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(u,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(d.funct(),mxEvent.consume(b))});this.window=
+new mxWindow(mxResources.get("find"),u,e,c,b,k,!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.fit();this.window.isVisible()?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?z.removeAttribute("disabled"):(z.checked=!1,z.setAttribute("disabled",
 "disabled"))):g.container.focus()}));this.window.setLocation=function(a,d){var b=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));d=Math.max(0,Math.min(d,b-this.table.clientHeight-48));this.getX()==a&&this.getY()==d||mxWindow.prototype.setLocation.apply(this,arguments)};var A=mxUtils.bind(this,function(){var a=this.window.getX(),
 d=this.window.getY();this.window.setLocation(a,d)});mxEvent.addListener(window,"resize",A);this.destroy=function(){mxEvent.removeListener(window,"resize",A);this.window.destroy()}},FreehandWindow=function(a,e,c,b,k){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var l=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});l.setAttribute("title",
 mxResources.get("startDrawing"));l.style.marginTop="8px";l.style.marginRight="4px";l.style.width="160px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.textAlign="center";l.className="geBtn gePrimaryBtn";a.appendChild(l);var d=l.cloneNode(!1);mxUtils.write(d,mxResources.get("stopDrawing"));d.setAttribute("title",mxResources.get("stopDrawing"));d.style.marginTop="4px";mxEvent.addListener(d,"click",function(){f.freehand.stopDrawing()});a.appendChild(d);this.window=new mxWindow(mxResources.get("freehand"),
@@ -8779,58 +8778,58 @@ c&&(c=document.createElement("p"),c.style.marginTop="20px",c.appendChild(g),f=do
 a.sidebar.customEntries[f],d={title:a.getResource(l.title),entries:[]},g=0;g<l.entries.length;g++){var m=l.entries[g];d.entries.push({id:m.id,title:a.getResource(m.title),desc:a.getResource(m.desc),image:m.preview})}k.push(d)}for(f=0;f<c.length;f++)if(null==a.sidebar.enabledLibraries)k.push(c[f]);else{d={title:c[f].title,entries:[]};for(g=0;g<c[f].entries.length;g++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[f].entries[g].id)&&d.entries.push(c[f].entries[g]);0<d.entries.length&&k.push(d)}c=k;
 if(e){g=mxUtils.bind(this,function(d){for(var b=0;b<d.length;b++)(function(d){var c=q.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,d.title);n.appendChild(c);for(var e=0;e<d.entries.length;e++)(function(d){var c=q.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.setAttribute("title",
 d.title+" ("+d.id+")");var g=document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(d.id);g.defaultChecked=g.checked;c.appendChild(g);mxUtils.write(c," "+d.title);n.appendChild(c);var m=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=d.desc){var b=document.createElement("pre");b.style.boxSizing="border-box";b.style.fontFamily="inherit";b.style.margin=
-"20px";b.style.right="0px";b.style.textAlign="left";mxUtils.write(b,d.desc);p.appendChild(b)}null!=d.imageCallback?d.imageCallback(p):null!=d.image?p.innerHTML+='<img border="0" src="'+d.image+'"/>':null==d.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=v&&(v.style.backgroundColor="");v=c;v.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",m);mxEvent.addListener(c,
+"20px";b.style.right="0px";b.style.textAlign="left";mxUtils.write(b,d.desc);p.appendChild(b)}null!=d.imageCallback?d.imageCallback(p):null!=d.image?p.innerHTML+='<img border="0" src="'+d.image+'"/>':null==d.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=u&&(u.style.backgroundColor="");u=c;u.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",m);mxEvent.addListener(c,
 "dblclick",function(a){g.checked=!g.checked;mxEvent.consume(a)});t.push(function(){return g.checked?d.id:null});0==b&&0==e&&m()})(d.entries[e])})(d[b])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var n=document.createElement("div"),p=document.createElement("div");
 n.style.position="absolute";n.style.top="40px";n.style.left="0px";n.style.width="202px";n.style.bottom="60px";n.style.overflow="auto";mxClient.IS_QUIRKS&&(n.style.height="437px",n.style.marginTop="1px");p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";mxClient.IS_QUIRKS&&(p.style.width=parseInt(f.style.width)-202+"px",p.style.height=n.style.height,
-p.style.marginTop=n.style.marginTop);var v=null,t=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";g(c);b.style.padding="30px";b.appendChild(f);b.appendChild(n);b.appendChild(p);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=
-f.style.width,c.style.paddingTop="12px");var u=document.createElement("input");u.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(u),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),u.checked=!0,u.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=u&&(u.checked=!u.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),
-c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var d=[],b=0;b<t.length;b++){var c=t[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(d.join(";"),u.checked,!0)});g.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";g=document.createElement("tr");z.style.width=
+p.style.marginTop=n.style.marginTop);var u=null,t=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";g(c);b.style.padding="30px";b.appendChild(f);b.appendChild(n);b.appendChild(p);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=
+f.style.width,c.style.paddingTop="12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(v),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),
+c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var d=[],b=0;b<t.length;b++){var c=t[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(d.join(";"),v.checked,!0)});g.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";g=document.createElement("tr");z.style.width=
 "100%";e=document.createElement("td");var k=document.createElement("td"),l=document.createElement("td"),y=mxUtils.bind(this,function(d,b,c){var e=document.createElement("input");e.type="checkbox";z.appendChild(e);e.checked=a.sidebar.isEntryVisible(c);var g=document.createElement("span");mxUtils.write(g,b);b=document.createElement("div");b.style.display="block";b.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});d.appendChild(b);return function(){return e.checked?
-c:null}});g.appendChild(e);g.appendChild(k);g.appendChild(l);f.appendChild(g);z.appendChild(f);for(var t=[],A=0,f=0;f<c.length;f++)for(g=0;g<c[f].entries.length;g++)A++;for(var x=[e,k,l],B=0,f=0;f<c.length;f++)(function(a){for(var d=0;d<a.entries.length;d++){var b=a.entries[d];t.push(y(x[Math.floor(B/(A/3))],b.title,b.id));B++}})(c[f]);b.appendChild(z);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";u=document.createElement("input");isLocalStorage&&(u.setAttribute("type",
-"checkbox"),u.checked=!0,u.defaultChecked=!0,c.appendChild(u),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var d=["search"],b=0;b<t.length;b++){var c=t[b].apply(this,arguments);null!=c&&
-d.push(c)}a.sidebar.showEntries(0<d.length?d.join(";"):"",u.checked);a.hideDialog()});g.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(g)):(c.appendChild(g),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a){function e(){if(0==k.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var d=0;d<k.length;d++){var c=
+c:null}});g.appendChild(e);g.appendChild(k);g.appendChild(l);f.appendChild(g);z.appendChild(f);for(var t=[],A=0,f=0;f<c.length;f++)for(g=0;g<c[f].entries.length;g++)A++;for(var x=[e,k,l],B=0,f=0;f<c.length;f++)(function(a){for(var d=0;d<a.entries.length;d++){var b=a.entries[d];t.push(y(x[Math.floor(B/(A/3))],b.title,b.id));B++}})(c[f]);b.appendChild(z);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type",
+"checkbox"),v.checked=!0,v.defaultChecked=!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var d=["search"],b=0;b<t.length;b++){var c=t[b].apply(this,arguments);null!=c&&
+d.push(c)}a.sidebar.showEntries(0<d.length?d.join(";"):"",v.checked);a.hideDialog()});g.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(g)):(c.appendChild(g),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a){function e(){if(0==k.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var d=0;d<k.length;d++){var c=
 document.createElement("span");c.style.whiteSpace="nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";c.appendChild(g);mxUtils.write(c,k[d]);b.appendChild(c);mxUtils.br(b);mxEvent.addListener(g,"click",function(d){return function(){a.confirm(mxResources.get("delete")+' "'+k[d]+'"?',function(){k.splice(d,1);e()})}}(d))}}}var c=document.createElement("div"),
 b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var k=mxSettings.getPlugins().slice();c.appendChild(b);e();var f=mxUtils.button(mxResources.get("add"),function(){var d="",b=urlParams.p;if(null!=b&&0<b.length){for(var c=b.split(";"),b=0;b<c.length;b++){var g=App.pluginRegistry[c[b]];null!=g&&(d+=g+";")}";"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1))}d=new FilenameDialog(a,d,mxResources.get("add"),function(a){if(null!=a&&0<a.length){c=a.split(";");for(a=0;a<c.length;a++){var d=
 c[a],b=App.pluginRegistry[d];null!=b&&(d=b);0<d.length&&0>mxUtils.indexOf(k,d)&&k.push(d)}e()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(d.container,300,80,!0,!0);d.init()});f.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";var d=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(k);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});d.className=
 "geBtn gePrimaryBtn";var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";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");g.appendChild(m);a.editor.cancelFirst?(g.appendChild(l),g.appendChild(f),g.appendChild(d)):(g.appendChild(f),g.appendChild(d),g.appendChild(l));c.appendChild(g);this.container=c},
 CropImageDialog=function(a,e,c){function b(a){null!=l&&l.destroy();l=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});l.bind({url:e})}var k=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height="300px";k.appendChild(f);var l=null;this.init=function(){b()};
-var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("id","croppieCircle");d.style.margin="5px";k.appendChild(d);var g=document.createElement("label");g.setAttribute("for","croppieCircle");mxUtils.write(g,mxResources.get("circle"));k.appendChild(g);var m,n,p,v,g=document.createElement("div");m=document.createElement("button");n=document.createElement("button");g.appendChild(m);g.appendChild(n);p=document.createElement("i");v=document.createElement("i");m.appendChild(p);
-n.appendChild(v);g.className="cr-rotate-controls";g.style["float"]="right";g.style.position="inherit";m.className="cr-rotate-l";n.className="cr-rotate-r";k.appendChild(g);m.addEventListener("click",function(){l.rotate(-90)});n.addEventListener("click",function(){l.rotate(90)});mxEvent.addListener(d,"change",function(){b(this.checked)});d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){l.result({type:"base64",
+var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("id","croppieCircle");d.style.margin="5px";k.appendChild(d);var g=document.createElement("label");g.setAttribute("for","croppieCircle");mxUtils.write(g,mxResources.get("circle"));k.appendChild(g);var m,n,p,u,g=document.createElement("div");m=document.createElement("button");n=document.createElement("button");g.appendChild(m);g.appendChild(n);p=document.createElement("i");u=document.createElement("i");m.appendChild(p);
+n.appendChild(u);g.className="cr-rotate-controls";g.style["float"]="right";g.style.position="inherit";m.className="cr-rotate-l";n.className="cr-rotate-r";k.appendChild(g);m.addEventListener("click",function(){l.rotate(-90)});n.addEventListener("click",function(){l.rotate(90)});mxEvent.addListener(d,"change",function(){b(this.checked)});d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){l.result({type:"base64",
 size:"original"}).then(function(d){c(d);a.hideDialog()})});g.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(d),m.appendChild(g)):(m.appendChild(g),m.appendChild(d));k.appendChild(m);this.container=k},EditGeometryDialog=function(a,e){var c=a.editor.graph,b=1==e.length?c.getCellGeometry(e[0]):null,k=document.createElement("div"),f=document.createElement("table"),l=document.createElement("tbody"),d=
 document.createElement("tr"),g=document.createElement("td"),m=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(g,mxResources.get("relative")+":");var n=document.createElement("input");n.setAttribute("type","checkbox");null!=b&&b.relative&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);this.init=function(){n.focus()};m.appendChild(n);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");
-mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";m.appendChild(p);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.y:"";m.appendChild(v);d.appendChild(g);
+mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";m.appendChild(p);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b?b.y:"";m.appendChild(u);d.appendChild(g);
 d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b&&null!=b.offset?b.offset.x:"";m.appendChild(t);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dy")+
-":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b&&null!=b.offset?b.offset.y:"";m.appendChild(q);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b?b.width:"";m.appendChild(u);d.appendChild(g);d.appendChild(m);
+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b&&null!=b.offset?b.offset.y:"";m.appendChild(q);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";m.appendChild(v);d.appendChild(g);d.appendChild(m);
 l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=b?b.height:"";m.appendChild(z);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var y=document.createElement("input");
 y.setAttribute("type","text");y.style.width="100px";y.value=1==e.length?mxUtils.getValue(c.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(y);d.appendChild(g);d.appendChild(m);l.appendChild(d);f.appendChild(l);k.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var d=0;d<e.length;d++){var b=c.getCellGeometry(e[d]);null!=
-b&&(b=b.clone(),c.isCellMovable(e[d])&&(b.relative=n.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(v.value).length&&(b.y=Number(v.value)),0<mxUtils.trim(t.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(t.value)),0<mxUtils.trim(q.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(q.value))),c.isCellResizable(e[d])&&(0<mxUtils.trim(u.value).length&&(b.width=Number(u.value)),0<mxUtils.trim(z.value).length&&(b.height=Number(z.value))),
+b&&(b=b.clone(),c.isCellMovable(e[d])&&(b.relative=n.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(u.value).length&&(b.y=Number(u.value)),0<mxUtils.trim(t.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(t.value)),0<mxUtils.trim(q.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(q.value))),c.isCellResizable(e[d])&&(0<mxUtils.trim(v.value).length&&(b.width=Number(v.value)),0<mxUtils.trim(z.value).length&&(b.height=Number(z.value))),
 c.getModel().setGeometry(e[d],b));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[e[d]])}}finally{c.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&A.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(A)):(f.appendChild(A),f.appendChild(b));k.appendChild(f);this.container=k},LibraryDialog=function(a,
-e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var d=null;if(null!=a)for(var b=t.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,k,p,v){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=k||null==u[b]){var J=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=F.title&&0<F.title.length?F.title:
+e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var d=null;if(null!=a)for(var b=t.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,k,p,u){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=k||null==v[b]){var J=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=F.title&&0<F.title.length?F.title:
 mxResources.get("untitled"));I.style.color=null==F.title||0==F.title.length?"#d0d0d0":""};t.style.backgroundImage="";q.style.display="none";var H=m,K=f;if(m>a.maxImageSize||f>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,f));m*=C;f*=C}H>K?(K=Math.round(100*K/H),H=100):(H=Math.round(100*H/K),K=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";
 y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=b){var D=document.createElement("img");D.setAttribute("src",x.convert(b));D.style.width=H+"px";D.style.height=K+"px";D.style.margin="10px";D.style.paddingBottom=Math.floor((100-K)/2)+"px";D.style.paddingLeft=Math.floor((100-H)/2)+"px";y.appendChild(D)}else if(null!=k){var L=a.stringToCells(Graph.decompress(k.xml));0<L.length&&(a.sidebar.createThumb(L,100,100,y,null,!0,!1),y.firstChild.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var M=document.createElement("img");M.setAttribute("src",Editor.closeImage);M.setAttribute("border","0");M.setAttribute("title",mxResources.get("delete"));M.setAttribute("align","top");M.style.paddingTop="4px";M.style.position="absolute";M.style.marginLeft="-12px";M.style.zIndex="1";M.style.cursor="pointer";mxEvent.addListener(M,"dragstart",function(a){mxEvent.consume(a)});(function(a,d,b){mxEvent.addListener(M,"click",function(c){u[d]=
+mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var M=document.createElement("img");M.setAttribute("src",Editor.closeImage);M.setAttribute("border","0");M.setAttribute("title",mxResources.get("delete"));M.setAttribute("align","top");M.style.paddingTop="4px";M.style.position="absolute";M.style.marginLeft="-12px";M.style.zIndex="1";M.style.cursor="pointer";mxEvent.addListener(M,"dragstart",function(a){mxEvent.consume(a)});(function(a,d,b){mxEvent.addListener(M,"click",function(c){v[d]=
 null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==d||null!=n[e].xml&&null!=b&&n[e].xml==b.xml){n.splice(e,1);break}y.parentNode.removeChild(a);0==n.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(c)});mxEvent.addListener(M,"dblclick",function(a){mxEvent.consume(a)})})(y,b,k);y.appendChild(M);y.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom=
-"-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var F=null;null!=b?(F={data:b,w:m,h:f,title:v},null!=p&&(F.aspect=p),u[b]=D,n.push(F)):null!=k&&(k.aspect="fixed",n.push(k),F=k);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});J();y.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});L=function(d){if(mxClient.IS_IOS||
+"-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var F=null;null!=b?(F={data:b,w:m,h:f,title:u},null!=p&&(F.aspect=p),v[b]=D,n.push(F)):null!=k&&(k.aspect="fixed",n.push(k),F=k);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});J();y.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});L=function(d){if(mxClient.IS_IOS||
 mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,F.title||"",mxResources.get("ok"),function(a){null!=a&&(F.title=a,J())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(d)}else if("true"!=I.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==F.title||0==F.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable",
 "true");mxUtils.setPrefixedStyle(I.style,"user-select","text");I.focus();document.execCommand("selectAll",!1,null);A=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";F.title=I.innerHTML;J()};mxEvent.consume(d)}};mxEvent.addListener(I,"click",L);mxEvent.addListener(y,"dblclick",L);t.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=k&&(M.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=k.xml&&a.dataTransfer.setData("Text",
 k.xml);z=l(a);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(y,30);M.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(a){"hidden"==M.style.visibility&&(M.style.visibility="",I.style.visibility="");z=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=
 !1;try{if(H=mxUtils.parseXml(b),"mxlibrary"==H.documentElement.nodeName){K=JSON.parse(mxUtils.getTextContent(H.documentElement));if(null!=K&&0<K.length)for(var E=0;E<K.length;E++)null!=K[E].xml?d(null,null,0,0,0,0,K[E]):d(K[E].data,null,0,0,K[E].w,K[E].h,null,"fixed",K[E].title);m=!0}else if("mxfile"==H.documentElement.nodeName){for(var G=H.documentElement.getElementsByTagName("diagram"),E=0;E<G.length;E++){var K=mxUtils.getTextContent(G[E]),L=a.stringToCells(Graph.decompress(K)),N=a.editor.graph.getBoundingBoxFromGeometry(L);
 d(null,null,0,0,0,0,{xml:K,w:N.width,h:N.height})}m=!0}}catch(ga){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ga){}return null}function g(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=z)null!=y&&y<t.children.length?(n.splice(y>z?y-1:y,0,n.splice(z,1)[0]),t.insertBefore(t.children[z],t.children[y])):(n.push(n.splice(z,1)[0]),t.appendChild(t.children[z]));
 else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){d(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];c=document.createElement("div");
-c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var v=document.createElement("input");v.setAttribute("value",e);v.style.marginRight="20px";v.style.marginLeft="10px";v.style.width="500px";null==k||k.isRenamable()||v.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())v.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};p.appendChild(v);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==n.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=
-document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));c.appendChild(q);var u={},z=null,y=null,A=null;e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",e);mxEvent.addListener(t,"pointerdown",e);mxEvent.addListener(t,"touchstart",
-e);var x=new mxUrlConverter,B=!1;if(null!=b)for(e=0;e<b.length;e++)p=b[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(t,"dragleave",function(a){q.style.cursor="";for(var d=mxEvent.getSource(a);null!=d;){if(d==t||d==q){a.stopPropagation();a.preventDefault();break}d=d.parentNode}});var C=function(b){return function(c,e,g,m,f,n,k,p,l){null!=l&&(/(\.vsdx)($|\?)/i.test(l.name)||/(\.vssx)($|\?)/i.test(l.name))?a.importVisio(l,mxUtils.bind(this,function(a){d(a,e,g,m,f,n,k,"fixed",mxEvent.isAltDown(b)?
-null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," "))})):null!=l&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,l.name)?a.parseFile(l,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(d(c.responseText,e,g,m,f,n,k,"fixed",mxEvent.isAltDown(b)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(d(c,e,g,m,f,n,k,"fixed",mxEvent.isAltDown(b)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g,
+c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var u=document.createElement("input");u.setAttribute("value",e);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width="500px";null==k||k.isRenamable()||u.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())u.focus(),mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};p.appendChild(u);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==n.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=
+document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));c.appendChild(q);var v={},z=null,y=null,A=null;e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",e);mxEvent.addListener(t,"pointerdown",e);mxEvent.addListener(t,"touchstart",
+e);var x=new mxUrlConverter,B=!1;if(null!=b)for(e=0;e<b.length;e++)p=b[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(t,"dragleave",function(a){q.style.cursor="";for(var d=mxEvent.getSource(a);null!=d;){if(d==t||d==q){a.stopPropagation();a.preventDefault();break}d=d.parentNode}});var C=function(b){return function(c,e,g,m,f,n,k,p,l){null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name))?a.importVisio(l,mxUtils.bind(this,function(a){d(a,e,g,m,f,n,
+k,"fixed",mxEvent.isAltDown(b)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," "))})):null!=l&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,l.name)?a.parseFile(l,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(d(c.responseText,e,g,m,f,n,k,"fixed",mxEvent.isAltDown(b)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(d(c,e,g,m,f,n,k,"fixed",mxEvent.isAltDown(b)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g,
 " ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",g);mxEvent.addListener(t,"drop",m);mxEvent.addListener(q,"dragover",g);mxEvent.addListener(q,"drop",m);c.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);p=mxUtils.button(mxResources.get("export"),function(){var d=a.createLibraryDataFromImages(n),
-b=v.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(d))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",
+b=u.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(d))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",
 function(d){B=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,b,c,e,g,m,f,n,k){null!=D.files&&(C(d)(a,b,c,e,g,m,f,n,k),D.type="",D.type="file",D.value="")});t.scrollTop=t.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);a.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";b.appendChild(p)}p=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=
-A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var e=a.indexOf(",");0<e&&(a=a.substring(0,e)+";base64,"+a.substring(e+1))}d(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(d,b,c,e){a.saveLibrary(d,b,c,e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(v.value,
+A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var e=a.indexOf(",");0<e&&(a=a.substring(0,e)+";base64,"+a.substring(e+1))}d(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(d,b,c,e){a.saveLibrary(d,b,c,e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(u.value,
 n,k,f)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(e);c.appendChild(b);this.container=c},EditShapeDialog=function(a,e,c,b,k){b=null!=b?b:300;k=null!=k?k:120;var f,l,d=document.createElement("table"),g=document.createElement("tbody");d.style.cellPadding="4px";f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,c);f.appendChild(l);g.appendChild(f);
 f=document.createElement("tr");l=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=b-200+"px";m.style.height=k+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};l.appendChild(m);f.appendChild(l);l=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=k+4+"px";c.style.overflow="hidden";
-c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(e);n.addCells([p]);c=n.view.getState(p);var v="";null!=c.shape&&null!=c.shape.stencil&&(v=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(m,v||"");c=n.getGraphBounds();k=Math.min(160/c.width,(k-40)/c.height);n.view.scaleAndTranslate(k,20/k-c.x,20/k-c.y);f.appendChild(l);g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");
+c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(e);n.addCells([p]);c=n.view.getState(p);var u="";null!=c.shape&&null!=c.shape.stencil&&(u=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(m,u||"");c=n.getGraphBounds();k=Math.min(160/c.width,(k-40)/c.height);n.view.scaleAndTranslate(k,20/k-c.x,20/k-c.y);f.appendChild(l);g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");
 l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),k.className="geBtn",l.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&l.appendChild(k);var t=function(d,b,c){var e=m.value,g=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(g.documentElement),
-g=g.documentElement.getElementsByTagName("parsererror");if(null!=g&&0<g.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),g=!d.model.contains(b),!c||g||e!=v){e=Graph.compress(e);d.getModel().beginUpdate();try{if(g){var f=a.editor.graph.getFreeInsertPoint();b.geometry.x=f.x;b.geometry.y=f.y;d.addCell(b)}d.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[b])}catch(B){throw B;}finally{d.getModel().endUpdate()}g&&
+g=g.documentElement.getElementsByTagName("parsererror");if(null!=g&&0<g.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),g=!d.model.contains(b),!c||g||e!=u){e=Graph.compress(e);d.getModel().beginUpdate();try{if(g){var f=a.editor.graph.getFreeInsertPoint();b.geometry.x=f.x;b.geometry.y=f.y;d.addCell(b)}d.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[b])}catch(B){throw B;}finally{d.getModel().endUpdate()}g&&
 (d.setSelectionCell(b),d.scrollCellToVisible(b))}};c=mxUtils.button(mxResources.get("preview"),function(){t(n,p,!1)});c.className="geBtn";l.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,e,!0)});c.className="geBtn gePrimaryBtn";l.appendChild(c);a.editor.cancelFirst||l.appendChild(k);f.appendChild(l);g.appendChild(f);d.appendChild(g);this.container=d},CustomDialog=function(a,e,c,b,k,f,l,d){var g=document.createElement("div");g.appendChild(e);e=document.createElement("div");
 e.style.marginTop="16px";e.style.textAlign="center";null!=l&&e.appendChild(l);a.isOffline()||null==f||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});l.className="geBtn";d&&(l.style.display="none");a.editor.cancelFirst&&e.appendChild(l);k=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c()});e.appendChild(k);k.className="geBtn gePrimaryBtn";
 a.editor.cancelFirst||e.appendChild(l);g.appendChild(e);this.cancelBtn=l;this.okButton=k;this.container=g},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
@@ -8839,17 +8838,17 @@ mxResources.get("myDiagrams",null,"My diagrams")+'</span></div><div class="geTem
 mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",e=document.createElement("div");e.innerHTML=a;e.className="geTemplateDlg";
 var a=window.innerWidth,c=window.innerHeight,b=987,k=712;.9*a<b&&(b=Math.max(.9*a,600),e.style.width=b+"px");.9*c<k&&(k=Math.max(.9*c,300),e.style.height=k+"px");this.width=b;this.height=k;this.container=e};
 TemplatesDialog.prototype.init=function(a,e,c,b,k,f,l,d,g,m){function n(){null!=G&&(G.style.fontWeight="normal",G.style.textDecoration="none",G=null)}function p(a,d,b,c,e,g,m){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+d).src="/images/"+b+"-sel.svg";C.querySelector("."+e).src="/images/"+
-g+".svg";return!0}function v(a){function d(a){W.removeChild(c);C.removeChild(b);W.scrollTop=g}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var b=document.createElement("div");b.className="geTempDlgDialogMask";C.appendChild(b);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var e=document.createElement("img");e.src=a;c.appendChild(e);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+g+".svg";return!0}function u(a){function d(a){W.removeChild(c);C.removeChild(b);W.scrollTop=g}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var b=document.createElement("div");b.className="geTempDlgDialogMask";C.appendChild(b);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var e=document.createElement("img");e.src=a;c.appendChild(e);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
 a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var g=W.scrollTop;mxEvent.addListener(a,"click",d);mxEvent.addListener(b,"click",d);W.appendChild(c);W.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function t(a,d,b){if(null!=E){for(var c=E.className.split(" "),e=0;e<c.length;e++)if(-1<c[e].indexOf("Active")){c.splice(e,1);break}E.className=c.join(" ")}null!=a?(E=a,E.className+=" "+d,J=b,Z.className="geTempDlgCreateBtn"):(J=E=null,Z.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function q(d){if(null!=J){var b=J;J=null;Z.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";b.isExternal?(1==d?m(b.url,b,"nameInput.value"):g(b.url,b,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+b.url,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(e(d.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function u(a){a=a?"":"none";for(var d=C.querySelectorAll(".geTempDlgLinkToDiagram"),b=0;b<d.length;b++)d[b].style.display=
-a}function z(a,d,b){function c(){Z.innerHTML=d?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));u(!d)}T.innerHTML="";t();M=a;var e=null;if(b){e=document.createElement("table");e.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=
+function q(d){if(null!=J){var b=J;J=null;Z.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";b.isExternal?(1==d?m(b.url,b,"nameInput.value"):g(b.url,b,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+b.url,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(e(d.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var d=C.querySelectorAll(".geTempDlgLinkToDiagram"),b=0;b<d.length;b++)d[b].style.display=
+a}function z(a,d,b){function c(){Z.innerHTML=d?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!d)}T.innerHTML="";t();M=a;var e=null;if(b){e=document.createElement("table");e.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=
 mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));g.appendChild(m);e.appendChild(g);T.appendChild(e)}for(g=0;g<a.length;g++){a[g].isExternal=!d;var f=a[g].url,m=mxUtils.htmlEntities(a[g].title),n=a[g].tooltip||a[g].title,k=a[g].imgUrl,p=mxUtils.htmlEntities(a[g].changedBy||""),l=mxUtils.htmlEntities(a[g].lastModifiedOn||
 "");k||(k=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=b?50:15;null!=m&&m.length>f&&(m=m.substring(0,f)+"&hellip;");if(b){var x=document.createElement("tr"),k=document.createElement("td"),J=document.createElement("img");J.src="/images/icon-search.svg";J.className="geTempDlgDiagramListPreviewBtn";J.setAttribute("title",mxResources.get("preview"));k.appendChild(J);n=document.createElement("span");n.className="geTempDlgDiagramTitle";n.innerHTML=m;k.appendChild(n);x.appendChild(k);k=document.createElement("td");
-k.innerHTML=p;x.appendChild(k);k=document.createElement("td");k.innerHTML=l;x.appendChild(k);e.appendChild(x);null==E&&(c(),t(x,"geTempDlgDiagramsListGridActive",a[g]));(function(a,d){mxEvent.addListener(x,"click",function(){E!=d&&(c(),t(d,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(x,"dblclick",q);mxEvent.addListener(J,"click",function(){v(a)})})(a[g],x)}else{var B=document.createElement("div");B.className="geTempDlgDiagramTile";B.setAttribute("title",n);null==E&&(c(),t(B,"geTempDlgDiagramTileActive",
+k.innerHTML=p;x.appendChild(k);k=document.createElement("td");k.innerHTML=l;x.appendChild(k);e.appendChild(x);null==E&&(c(),t(x,"geTempDlgDiagramsListGridActive",a[g]));(function(a,d){mxEvent.addListener(x,"click",function(){E!=d&&(c(),t(d,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(x,"dblclick",q);mxEvent.addListener(J,"click",function(){u(a)})})(a[g],x)}else{var B=document.createElement("div");B.className="geTempDlgDiagramTile";B.setAttribute("title",n);null==E&&(c(),t(B,"geTempDlgDiagramTileActive",
 a[g]));p=document.createElement("div");p.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var H=document.createElement("img");H.style.display="none";(function(a,d){H.onload=function(){d.className="geTempDlgDiagramTileImg";a.style.display=""};H.onerror=function(){d.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(H,p);H.src=k;p.appendChild(H);B.appendChild(p);p=document.createElement("div");p.className="geTempDlgDiagramTileLbl";p.innerHTML=null!=m?m:"";B.appendChild(p);
-J=document.createElement("img");J.src="/images/icon-search.svg";J.className="geTempDlgDiagramPreviewBtn";J.setAttribute("title",mxResources.get("preview"));B.appendChild(J);(function(a,d){mxEvent.addListener(B,"click",function(){E!=d&&(c(),t(d,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(B,"dblclick",q);mxEvent.addListener(J,"click",function(){v(a)})})(a[g],B);T.appendChild(B)}}}function y(a,d){X.innerHTML="";t();for(var b=!d&&5<a.length?5:a.length,c=0;c<b;c++){var e=a[c];e.isCategory=!0;
-var g=document.createElement("div"),m=mxResources.get(e.title);null==m&&(m=e.title.substring(0,1).toUpperCase()+e.title.substring(1));g.className="geTempDlgNewDiagramCatItem";g.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==E&&(Z.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),u(),t(g,"geTempDlgNewDiagramCatItemActive",e));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");
-n.src=NEW_DIAGRAM_CATS_PATH+"/"+e.img;f.appendChild(n);g.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=m;g.appendChild(f);X.appendChild(g);(function(a,d){mxEvent.addListener(g,"click",function(){E!=d&&(Z.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),u(),t(d,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(g,"dblclick",q)})(e,g)}U.style.display=5>a.length?"none":""}function A(a){var d=C.querySelector(".geTemplatesList"),
+J=document.createElement("img");J.src="/images/icon-search.svg";J.className="geTempDlgDiagramPreviewBtn";J.setAttribute("title",mxResources.get("preview"));B.appendChild(J);(function(a,d){mxEvent.addListener(B,"click",function(){E!=d&&(c(),t(d,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(B,"dblclick",q);mxEvent.addListener(J,"click",function(){u(a)})})(a[g],B);T.appendChild(B)}}}function y(a,d){X.innerHTML="";t();for(var b=!d&&5<a.length?5:a.length,c=0;c<b;c++){var e=a[c];e.isCategory=!0;
+var g=document.createElement("div"),m=mxResources.get(e.title);null==m&&(m=e.title.substring(0,1).toUpperCase()+e.title.substring(1));g.className="geTempDlgNewDiagramCatItem";g.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==E&&(Z.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),t(g,"geTempDlgNewDiagramCatItemActive",e));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");
+n.src=NEW_DIAGRAM_CATS_PATH+"/"+e.img;f.appendChild(n);g.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=m;g.appendChild(f);X.appendChild(g);(function(a,d){mxEvent.addListener(g,"click",function(){E!=d&&(Z.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),t(d,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(g,"dblclick",q)})(e,g)}U.style.display=5>a.length?"none":""}function A(a){var d=C.querySelector(".geTemplatesList"),
 b;for(b in a){var c=document.createElement("div"),e=mxResources.get(b),g=a[b];null==e&&(e=b.substring(0,1).toUpperCase()+b.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",e+" ("+g.length+")");e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"&hellip;");c.innerHTML=e+" ("+g.length+")";d.appendChild(c);(function(d,b,e){mxEvent.addListener(c,"click",function(){G!=e&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(V.style.display="none",S.style.minHeight=
 "100%"),G=e,G.style.fontWeight="bold",G.style.textDecoration="underline",W.scrollTop=0,D&&(F=!0),ca.innerHTML=b,ba.style.display="none",z(a[d],!0))})})(b,e,c)}}function x(a){l&&(W.scrollTop=0,T.innerHTML="",aa.spin(T),F=!1,D=!0,ca.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),I=null,l(Y,a?null:f))}function B(a){n();W.scrollTop=0;T.innerHTML="";aa.spin(T);F=!1;D=!0;da=null;ca.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+
 ' "'+mxUtils.htmlEntities(a)+'"';d(a,Y,H?null:f);I=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,D=!1,F=!1,G=null,E=null,J=null,K=!1,H=!0,L=!1,M=[],I,U=C.querySelector(".geTempDlgShowAllBtn"),T=C.querySelector(".geTempDlgDiagramsTiles"),ca=C.querySelector(".geTempDlgDiagramsListTitle"),ba=C.querySelector(".geTempDlgDiagramsListBtns"),W=C.querySelector(".geTempDlgContent"),S=C.querySelector(".geTempDlgDiagramsList"),V=C.querySelector(".geTempDlgNewDiagramCat"),
@@ -8863,16 +8862,16 @@ var BtnDialog=function(a,e,c,b){var k=document.createElement("div");k.style.text
 (l=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(l=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==a.gitHub?(l=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==a.gitLab?(l=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg"):e==a.trello&&(l=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[l],"You are now authorized in {1}"));
 c=mxUtils.button(c,b);c.insertBefore(d,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";k.appendChild(f);k.appendChild(a);k.appendChild(c);this.container=k},FontDialog=function(a,e,c,b,k){function f(a){this.style.border="";13==a.keyCode&&A.click()}var l,d,g,m=document.createElement("table"),n=document.createElement("tbody");m.style.marginTop="8px";l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace=
 "nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","sysfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-sysfonts");d.appendChild(p);g=document.createElement("label");g.setAttribute("for","fontdialog-sysfonts");mxUtils.write(g,mxResources.get("sysFonts",null,"System Fonts"));d.appendChild(g);l.appendChild(d);n.appendChild(l);
-l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(d);var v=document.createElement("input");"s"==b&&v.setAttribute("value",e);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(v);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");
+l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(d);var u=document.createElement("input");"s"==b&&u.setAttribute("value",e);u.style.marginLeft="4px";u.style.width="250px";u.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(u);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");
 d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","googlefonts");t.setAttribute("type","radio");t.setAttribute("name","current-fontdialog");t.setAttribute("id","fontdialog-googlefonts");d.appendChild(t);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts",
 null,"Google Fonts"));d.appendChild(g);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(d);var q=document.createElement("input");"g"==b&&q.setAttribute("value",e);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_g";d=document.createElement("td");d.appendChild(q);
-l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","webfonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-webfonts");d.appendChild(u);g=document.createElement("label");g.setAttribute("for",
+l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");d.appendChild(v);g=document.createElement("label");g.setAttribute("for",
 "fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));d.appendChild(g);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(d);var z=document.createElement("input");"w"==b&&z.setAttribute("value",e);z.style.marginLeft="4px";z.style.width="250px";
 z.className="dlg_fontName_w";d=document.createElement("td");d.appendChild(z);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontUrl",null,"Font URL")+":");l.appendChild(d);var y=document.createElement("input");y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";d=document.createElement("td");
-d.appendChild(y);l.appendChild(d);n.appendChild(l);this.init=function(){var a=v;"g"==b?a=q:"w"==b&&(a=z);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),
-e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){var d,b,c;p.checked?(d=v.value,c="s"):t.checked?(d=q.value,b=Editor.GOOGLE_FONTS+encodeURIComponent(d).replace(/%20/g,"+"),c="g"):u.checked&&(d=z.value,b=y.value,c="w");var e;e=b;var g=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==
-d||0==d.length?(m.querySelector(".dlg_fontName_"+g).style.border="1px solid red",e=!1):"w"!=g||f.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(k(d,b,c),a.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(v,"keypress",f);mxEvent.addListener(q,"keypress",f);mxEvent.addListener(z,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(v,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(q,"focus",
-function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(z,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(y,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});d.appendChild(A);a.editor.cancelFirst||d.appendChild(e);l.appendChild(d);n.appendChild(l);m.appendChild(n);this.container=m};
+d.appendChild(y);l.appendChild(d);n.appendChild(l);this.init=function(){var a=u;"g"==b?a=q:"w"==b&&(a=z);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),
+e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){var d,b,c;p.checked?(d=u.value,c="s"):t.checked?(d=q.value,b=Editor.GOOGLE_FONTS+encodeURIComponent(d).replace(/%20/g,"+"),c="g"):v.checked&&(d=z.value,b=y.value,c="w");var e;e=b;var g=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==
+d||0==d.length?(m.querySelector(".dlg_fontName_"+g).style.border="1px solid red",e=!1):"w"!=g||f.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(k(d,b,c),a.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",f);mxEvent.addListener(q,"keypress",f);mxEvent.addListener(z,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(u,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(q,"focus",
+function(){t.setAttribute("checked","checked");t.checked=!0});mxEvent.addListener(z,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});d.appendChild(A);a.editor.cancelFirst||d.appendChild(e);l.appendChild(d);n.appendChild(l);m.appendChild(n);this.container=m};
 function AspectDialog(a,e,c,b,k){this.aspect={pageId:e||a.pages[0].getId(),layerIds:c||[]};e=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));e.appendChild(f);c=document.createElement("div");c.className="geAspectDlgList";e.appendChild(c);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));e.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList";
 e.appendChild(f);this.pagesContainer=c;this.layersContainer=f;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);var l=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(l);l.className="geBtn gePrimaryBtn";
 a.editor.cancelFirst||c.appendChild(f);l.setAttribute("disabled","disabled");this.okBtn=l;e.appendChild(c);this.container=e}AspectDialog.prototype.init=function(){this.ui.getFileData(!0);for(var a=0;a<this.ui.pages.length;a++){var e=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(e.getId(),e.getName(),e.node,e.root)}};
@@ -8956,18 +8955,18 @@ else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))d="applicatio
 mxUtils.bind(this,function(d){this.cachedFonts[a]=d;e--;g()}),mxUtils.bind(this,function(a){e--;g()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(b(c[m].substring(0,f)),n)}g()}else d(a)};Editor.prototype.loadFonts=function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;a()})):a()};Editor.prototype.embedExtFonts=function(a){var d=this.graph.extFonts;if(null!=d&&0<d.length){var b="",c=0;null==this.cachedGoogleFonts&&
 (this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),g=0;g<d.length;g++)mxUtils.bind(this,function(a,d){0==d.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[d]?(c++,this.loadUrl(d,mxUtils.bind(this,function(a){this.cachedGoogleFonts[d]=a;b+=a;c--;e()}),mxUtils.bind(this,function(a){c--;b+="@import url("+d+");";e()}))):b+=this.cachedGoogleFonts[d]:b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[g].name,d[g].url);e()}else a()};Editor.prototype.addMathCss=
 function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var d=document.getElementsByTagName("style"),b=0;b<d.length;b++)0<mxUtils.getTextContent(d[b]).indexOf("MathJax")&&a[0].appendChild(d[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a,d){d=null!=d?d:this.fontCss;if(null!=d){var b=a.getElementsByTagName("defs"),c=a.ownerDocument;0==b.length?(b=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(b,
-a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,d);b.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,d,b,c,e,g,m,f,n,k,p,l,v,u,x){try{g=null!=g?g:!0;m=null!=m?m:!0;l=null!=l?l:this.graph;v=null!=v?v:0;var t=n?null:l.background;t==mxConstants.NONE&&
-(t=null);null==t&&(t=c);null==t&&0==n&&(t="#ffffff");this.convertImages(l.getSvg(null,null,null,u,null,m,null,null,null,k),mxUtils.bind(this,function(b){try{var c=new Image;c.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){u.drawImage(c,v/f,v/f);a(n)},0):(u.drawImage(c,v/f,v/f),a(n))},n=document.createElement("canvas"),k=parseInt(b.getAttribute("width")),p=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=d&&(f=g?Math.min(1,Math.min(3*d/(4*
-p),d/k)):d/k);k=Math.ceil(f*k)+2*v;p=Math.ceil(f*p)+2*v;n.setAttribute("width",k);n.setAttribute("height",p);var u=n.getContext("2d");null!=t&&(u.beginPath(),u.rect(0,0,k,p),u.fillStyle=t,u.fill());u.scale(f,f);if(x){var q=l.view,B=q.scale;q.scale=1;var C=btoa(unescape(encodeURIComponent(q.createSvgGrid(q.gridColor))));q.scale=B;var C="data:image/svg+xml;base64,"+C,y=l.gridSize*q.gridSteps*f,J=l.getGraphBounds(),H=q.translate.x*B,z=q.translate.y*B,D=H+(J.x-H)/B,K=z+(J.y-z)/B,A=new Image;A.onload=
-function(){try{for(var a=-Math.round(y-mxUtils.mod((H-D)*f,y)),d=-Math.round(y-mxUtils.mod((z-K)*f,y));a<k;a+=y)for(var b=d;b<p;b+=y)u.drawImage(A,a/f,b/f);m()}catch(va){null!=e&&e(va)}};A.onerror=function(a){null!=e&&e(a)};A.src=C}else m()}catch(qa){null!=e&&e(qa)}});c.onerror=function(a){null!=e&&e(a)};k&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(ga){null!=
+a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,d);b.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,d,b,c,e,g,m,f,n,k,p,l,u,v,x){try{g=null!=g?g:!0;m=null!=m?m:!0;l=null!=l?l:this.graph;u=null!=u?u:0;var t=n?null:l.background;t==mxConstants.NONE&&
+(t=null);null==t&&(t=c);null==t&&0==n&&(t="#ffffff");this.convertImages(l.getSvg(null,null,null,v,null,m,null,null,null,k),mxUtils.bind(this,function(b){try{var c=new Image;c.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(c,u/f,u/f);a(n)},0):(v.drawImage(c,u/f,u/f),a(n))},n=document.createElement("canvas"),k=parseInt(b.getAttribute("width")),p=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=d&&(f=g?Math.min(1,Math.min(3*d/(4*
+p),d/k)):d/k);k=Math.ceil(f*k)+2*u;p=Math.ceil(f*p)+2*u;n.setAttribute("width",k);n.setAttribute("height",p);var v=n.getContext("2d");null!=t&&(v.beginPath(),v.rect(0,0,k,p),v.fillStyle=t,v.fill());v.scale(f,f);if(x){var q=l.view,B=q.scale;q.scale=1;var C=btoa(unescape(encodeURIComponent(q.createSvgGrid(q.gridColor))));q.scale=B;var C="data:image/svg+xml;base64,"+C,y=l.gridSize*q.gridSteps*f,J=l.getGraphBounds(),H=q.translate.x*B,z=q.translate.y*B,D=H+(J.x-H)/B,K=z+(J.y-z)/B,A=new Image;A.onload=
+function(){try{for(var a=-Math.round(y-mxUtils.mod((H-D)*f,y)),d=-Math.round(y-mxUtils.mod((z-K)*f,y));a<k;a+=y)for(var b=d;b<p;b+=y)v.drawImage(A,a/f,b/f);m()}catch(va){null!=e&&e(va)}};A.onerror=function(a){null!=e&&e(a)};A.src=C}else m()}catch(qa){null!=e&&e(qa)}});c.onerror=function(a){null!=e&&e(a)};k&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(ga){null!=
 e&&e(ga)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(m)}catch(R){null!=e&&e(R)}}))}catch(ga){null!=e&&e(ga)}}),b,p)}catch(P){null!=e&&e(P)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var f=k,l=0;8>l;l++)f=1==(f&1)?3988292384^f>>>1:f>>>1,Editor.crcTable[k]=f;Editor.updateCRC=function(a,d,b,c){for(var e=0;e<c;e++)a=Editor.crcTable[(a^d.charCodeAt(b+e))&255]^a>>>8;return a};Editor.crc32=function(a){for(var d=-1,b=0;b<a.length;b++)d=d>>>8^Editor.crcTable[(d^
 a.charCodeAt(b))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(a,d,b,c,e){function g(a,d){var b=n;n+=d;return a.substring(b,n)}function m(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,
 4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,n);do{var k=m(a);if("IDAT"==g(a,4)){e=a.substring(0,n-8);"pHYs"==d&&"dpi"==b?(b=Math.round(c/.0254),b=f(b)+f(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,d,0,4);c=Editor.updateCRC(c,b,0,b.length);e+=f(b.length)+d+b+f(c^4294967295);e+=a.substring(n-8,a.length);break}e+=a.substring(n-8,n-4+k);g(a,k);g(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?
 btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
 (EditDataDialog.getDisplayIdForCell=function(a,d){var b=null;null!=a.editor.graph.getModel().getParent(d)?b=d.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
 n.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"),
-function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var v=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(a){a=v.apply(this,arguments);var d=this.editorUi,b=d.editor.graph;if(b.isEnabled()){var c=d.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(a){d.editor.setAutosave(a);d.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
+function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var u=DiagramFormatPanel.prototype.addOptions;
+DiagramFormatPanel.prototype.addOptions=function(a){a=u.apply(this,arguments);var d=this.editorUi,b=d.editor.graph;if(b.isEnabled()){var c=d.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(a){d.editor.setAutosave(a);d.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
 a.appendChild(e)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){d.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";a.appendChild(e);var g=d.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
 g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
 [{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
@@ -8995,20 +8994,20 @@ Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperti
 {},b=a.vertices,c=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],d,0==e);for(e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==b.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,a))}};var q=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));
 d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);
 mxUtils.br(a);return q.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,d,b){function c(a,d,b,c){l.getModel().beginUpdate();try{var e=[],g=[];if(null!=b.index){for(var m=[],f=b.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)m.push(f.getAttribute("data-pValue")),f=f.nextSibling;b.index<m.length?null!=c?m.splice(c,1):m[b.index]=d:m.push(d);null!=b.size&&m.length>b.size&&(m=m.slice(0,b.size));d=m.join(",");null!=b.countProperty&&
-(l.setCellStyles(b.countProperty,m.length,l.getSelectionCells()),e.push(b.countProperty),g.push(m.length))}l.setCellStyles(a,d,l.getSelectionCells());e.push(a);g.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],k=b.dependentPropsVals[a];if(k.length>d)k=k.slice(0,d);else for(var v=k.length;v<d;v++)k.push(n);k=k.join(",");l.setCellStyles(b.dependentProps[a],k,l.getSelectionCells());e.push(b.dependentProps[a]);g.push(k)}if("function"==typeof b.onChange)b.onChange(l,
+(l.setCellStyles(b.countProperty,m.length,l.getSelectionCells()),e.push(b.countProperty),g.push(m.length))}l.setCellStyles(a,d,l.getSelectionCells());e.push(a);g.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],k=b.dependentPropsVals[a];if(k.length>d)k=k.slice(0,d);else for(var u=k.length;u<d;u++)k.push(n);k=k.join(",");l.setCellStyles(b.dependentProps[a],k,l.getSelectionCells());e.push(b.dependentProps[a]);g.push(k)}if("function"==typeof b.onChange)b.onChange(l,
 d);p.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}function e(d,b,c){var e=mxUtils.getOffset(a,!0),g=mxUtils.getOffset(d,!0);b.style.position="absolute";b.style.left=g.x-e.x+"px";b.style.top=g.y-e.y+"px";b.style.width=d.offsetWidth+"px";b.style.height=d.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function g(a,d,b){var e=document.createElement("div");e.style.width="32px";e.style.height="4px";e.style.margin="2px";
-e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(p,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(a,d,b,e,g,m,f){null!=d&&(d=d.split(","),v.push({name:a,values:d,type:b,defVal:e,countProperty:g,
+e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(p,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(a,d,b,e,g,m,f){null!=d&&(d=d.split(","),u.push({name:a,values:d,type:b,defVal:e,countProperty:g,
 parentRow:m,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(p,function(d){for(var n=m,p=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,p++;else break;var l={type:b,parentRow:m,index:p,isDeletable:!0,defVal:e,countProperty:g},p=k(a,"",l,0==p%2,f);c(a,e,l);n.parentNode.insertBefore(p,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,d,b,c,e,g,m){if(0<e){var f=Array(e);
-d=null!=d?d.split(","):[];for(var n=0;n<e;n++)f[n]=null!=d[n]?d[n]:null!=c?c:"";v.push({name:a,values:f,type:b,defVal:c,parentRow:g,flipBkg:m,size:e})}return document.createElement("div")}function n(a,d,b){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){c(a,e.checked?"1":"0",b)});return e}function k(d,b,k,l,v){var u=k.dispName,x=k.type,t=document.createElement("tr");t.className="gePropRow"+(v?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";
-t.setAttribute("data-pName",d);t.setAttribute("data-pValue",b);l=!1;null!=k.index&&(t.setAttribute("data-index",k.index),u=(null!=u?u:"")+"["+k.index+"]",l=!0);var q=document.createElement("td");q.className="gePropRowCell";q.innerHTML=mxUtils.htmlEntities(mxResources.get(u,null,u));l&&(q.style.textAlign="right");t.appendChild(q);q=document.createElement("td");q.className="gePropRowCell";if("color"==x)q.appendChild(g(d,b,k));else if("bool"==x||"boolean"==x)q.appendChild(n(d,b,k));else if("enum"==x){var B=
-k.enumList;for(v=0;v<B.length;v++)if(u=B[v],u.val==b){q.innerHTML=mxUtils.htmlEntities(mxResources.get(u.dispName,null,u.dispName));break}mxEvent.addListener(q,"click",mxUtils.bind(p,function(){var g=document.createElement("select");e(q,g);for(var m=0;m<B.length;m++){var f=B[m],n=document.createElement("option");n.value=mxUtils.htmlEntities(f.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));g.appendChild(n)}g.value=b;a.appendChild(g);mxEvent.addListener(g,"change",
-function(){var a=mxUtils.htmlEntities(g.value);c(d,a,k)});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})}))}else"dynamicArr"==x?q.appendChild(m(d,b,k.subType,k.subDefVal,k.countProperty,t,v)):"staticArr"==x?q.appendChild(f(d,b,k.subType,k.subDefVal,k.size,t,v)):(q.innerHTML=b,mxEvent.addListener(q,"click",mxUtils.bind(p,function(){function g(){var a=m.value,a=0==a.length&&"string"!=x?0:a;k.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",x="string"):(a=parseFloat(a),
+d=null!=d?d.split(","):[];for(var n=0;n<e;n++)f[n]=null!=d[n]?d[n]:null!=c?c:"";u.push({name:a,values:f,type:b,defVal:c,parentRow:g,flipBkg:m,size:e})}return document.createElement("div")}function n(a,d,b){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){c(a,e.checked?"1":"0",b)});return e}function k(d,b,k,l,u){var v=k.dispName,x=k.type,t=document.createElement("tr");t.className="gePropRow"+(u?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";
+t.setAttribute("data-pName",d);t.setAttribute("data-pValue",b);l=!1;null!=k.index&&(t.setAttribute("data-index",k.index),v=(null!=v?v:"")+"["+k.index+"]",l=!0);var q=document.createElement("td");q.className="gePropRowCell";q.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));l&&(q.style.textAlign="right");t.appendChild(q);q=document.createElement("td");q.className="gePropRowCell";if("color"==x)q.appendChild(g(d,b,k));else if("bool"==x||"boolean"==x)q.appendChild(n(d,b,k));else if("enum"==x){var B=
+k.enumList;for(u=0;u<B.length;u++)if(v=B[u],v.val==b){q.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(q,"click",mxUtils.bind(p,function(){var g=document.createElement("select");e(q,g);for(var m=0;m<B.length;m++){var f=B[m],n=document.createElement("option");n.value=mxUtils.htmlEntities(f.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));g.appendChild(n)}g.value=b;a.appendChild(g);mxEvent.addListener(g,"change",
+function(){var a=mxUtils.htmlEntities(g.value);c(d,a,k)});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})}))}else"dynamicArr"==x?q.appendChild(m(d,b,k.subType,k.subDefVal,k.countProperty,t,u)):"staticArr"==x?q.appendChild(f(d,b,k.subType,k.subDefVal,k.size,t,u)):(q.innerHTML=b,mxEvent.addListener(q,"click",mxUtils.bind(p,function(){function g(){var a=m.value,a=0==a.length&&"string"!=x?0:a;k.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",x="string"):(a=parseFloat(a),
 a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==x?parseInt(a):a)+"");c(d,a,k)}var m=document.createElement("input");e(q,m,!0);m.value=b;m.className="gePropEditor";"int"!=x&&"float"!=x||k.allowAuto||(m.type="number",m.step="int"==x?"1":"any",null!=k.min&&(m.min=parseFloat(k.min)),null!=k.max&&(m.max=parseFloat(k.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&g()});m.focus();mxEvent.addListener(m,"blur",
-function(){g()})})));k.isDeletable&&(v=mxUtils.button("-",mxUtils.bind(p,function(a){c(d,"",k,k.index);mxEvent.consume(a)})),v.style.height="16px",v.style.width="25px",v.style["float"]="right",v.className="geColorBtn",q.appendChild(v));t.appendChild(q);return t}var p=this,l=this.editorUi.editor.graph,v=[];a.style.position="relative";a.style.padding="0";var u=document.createElement("table");u.style.whiteSpace="nowrap";u.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";
-var t=document.createElement("th");t.className="gePropHeaderCell";var q=document.createElement("img");q.src=Sidebar.prototype.expandedImage;t.appendChild(q);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var B=function(){var d=u.querySelectorAll(".gePropNonHeaderRow"),b;if(p.editorUi.propertiesCollapsed){q.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var e=a.childNodes[c],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||a.removeChild(e)}catch(la){}}else q.src=
-Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(x,"click",function(){p.editorUi.propertiesCollapsed=!p.editorUi.propertiesCollapsed;B()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");x.appendChild(t);u.appendChild(x);var C=!1,y=!1,z;for(z in d)if(x=d[z],"function"!=typeof x.isVisible||x.isVisible(b,this)){var H=null!=b.style[z]?mxUtils.htmlEntities(b.style[z]+""):null!=x.getDefaultValue?
-x.getDefaultValue(b,this):x.defVal;if("separator"==x.type)y=!y;else{if("staticArr"==x.type)x.size=parseInt(b.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var D=x.dependentProps,J=[],A=[],t=0;t<D.length;t++){var F=b.style[D[t]];A.push(d[D[t]].subDefVal);J.push(null!=F?F.split(","):[])}x.dependentPropsDefVal=A;x.dependentPropsVals=J}u.appendChild(k(z,H,x,C,y));C=!C}}for(t=0;t<v.length;t++)for(x=v[t],d=x.parentRow,b=0;b<x.values.length;b++)z=k(x.name,x.values[b],
-{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:b,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==b%2,x.flipBkg),d.parentNode.insertBefore(z,d.nextSibling),d=z;a.appendChild(u);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var e=c.getModel().getStyle(b[d]),m=0;m<g.length;m++)e=mxUtils.removeStylename(e,
+function(){g()})})));k.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(p,function(a){c(d,"",k,k.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",q.appendChild(u));t.appendChild(q);return t}var p=this,l=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";
+var t=document.createElement("th");t.className="gePropHeaderCell";var q=document.createElement("img");q.src=Sidebar.prototype.expandedImage;t.appendChild(q);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var B=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),b;if(p.editorUi.propertiesCollapsed){q.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var e=a.childNodes[c],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||a.removeChild(e)}catch(la){}}else q.src=
+Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(x,"click",function(){p.editorUi.propertiesCollapsed=!p.editorUi.propertiesCollapsed;B()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var C=!1,y=!1,z;for(z in d)if(x=d[z],"function"!=typeof x.isVisible||x.isVisible(b,this)){var H=null!=b.style[z]?mxUtils.htmlEntities(b.style[z]+""):null!=x.getDefaultValue?
+x.getDefaultValue(b,this):x.defVal;if("separator"==x.type)y=!y;else{if("staticArr"==x.type)x.size=parseInt(b.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var D=x.dependentProps,J=[],A=[],t=0;t<D.length;t++){var F=b.style[D[t]];A.push(d[D[t]].subDefVal);J.push(null!=F?F.split(","):[])}x.dependentPropsDefVal=A;x.dependentPropsVals=J}v.appendChild(k(z,H,x,C,y));C=!C}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,b=0;b<x.values.length;b++)z=k(x.name,x.values[b],
+{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:b,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==b%2,x.flipBkg),d.parentNode.insertBefore(z,d.nextSibling),d=z;a.appendChild(v);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var e=c.getModel().getStyle(b[d]),m=0;m<g.length;m++)e=mxUtils.removeStylename(e,
 g[m]);var f=c.getModel().isVertex(b[d])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),e=""==a.fill?mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,null)),e=""==a.stroke?mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,
 a.stroke||mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(b[d])&&(e=mxUtils.setStyle(e,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null)))):(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,"#ffffff")),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,"#000000")),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(f,
 mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(b[d])&&(e=mxUtils.setStyle(e,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(b[d],e)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+
@@ -9021,15 +9020,15 @@ mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.editorUi.current
 (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 c=this.editorUi.editor.graph,e=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=e&&null!=e.shape&&null!=e.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
 function(a){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom="2px",null==b?d.style.width="202px":(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d)):d.image&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==b?d.style.width="202px":
 (b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var u=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=document.createEventObject(a),d.type=a.type,d.canBubble=a.canBubble,d.cancelable=a.cancelable,d.view=a.view,d.detail=a.detail,d.screenX=a.screenX,d.screenY=a.screenY,d.clientX=a.clientX,d.clientY=a.clientY,d.ctrlKey=a.ctrlKey,d.altKey=a.altKey,d.shiftKey=a.shiftKey,d.metaKey=a.metaKey,d.button=
-a.button,d.relatedTarget=a.relatedTarget}catch(I){}}u.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):b.apply(this,arguments)};var c=this.layoutManager.getLayout;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var v=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=document.createEventObject(a),d.type=a.type,d.canBubble=a.canBubble,d.cancelable=a.cancelable,d.view=a.view,d.detail=a.detail,d.screenX=a.screenX,d.screenY=a.screenY,d.clientX=a.clientX,d.clientY=a.clientY,d.ctrlKey=a.ctrlKey,d.altKey=a.altKey,d.shiftKey=a.shiftKey,d.metaKey=a.metaKey,d.button=
+a.button,d.relatedTarget=a.relatedTarget}catch(I){}}v.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):b.apply(this,arguments)};var c=this.layoutManager.getLayout;
 this.layoutManager.getLayout=function(a){var d=this.graph.getCellStyle(a);if(null!=d){if("rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.allowGaps=d.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
 d.childLayout)return b=new mxTableLayout(this.graph),b.rows=d.tableRows||2,b.columns=d.tableColumns||2,b.colPercentages=d.colPercentages,b.rowPercentages=d.rowPercentages,b.equalColumns="1"==mxUtils.getValue(d,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(d,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.border=d.tableBorder||b.border,b.marginLeft=d.marginLeft||0,b.marginRight=d.marginRight||0,b.marginTop=d.marginTop||
 0,b.marginBottom=d.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=d.colWidths||"100",b.rowHeights=d.rowHeights||"50",b}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=
 Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d=
 y.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,e,g,m,f,n,k,p){var l=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
-(l=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var v=A.apply(this,arguments);if(p&&null!=this.extFonts&&0<this.extFonts.length){var u=v.ownerDocument,x=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"style"):u.createElement("style");null!=u.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var t="",q="",B=0;B<this.extFonts.length;B++){var C=this.extFonts[B].name,y=this.extFonts[B].url;0==y.indexOf(Editor.GOOGLE_FONTS)?
-t+="@import url("+y+");\n":q+='@font-face {\nfont-family: "'+C+'";\nsrc: url("'+y+'");\n}\n'}x.appendChild(u.createTextNode(t+q));v.getElementsByTagName("defs")[0].appendChild(x)}null!=l&&(this.stylesheet=l,this.refresh());return v};var x=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=x.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
+(l=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var u=A.apply(this,arguments);if(p&&null!=this.extFonts&&0<this.extFonts.length){var v=u.ownerDocument,x=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var t="",q="",B=0;B<this.extFonts.length;B++){var C=this.extFonts[B].name,y=this.extFonts[B].url;0==y.indexOf(Editor.GOOGLE_FONTS)?
+t+="@import url("+y+");\n":q+='@font-face {\nfont-family: "'+C+'";\nsrc: url("'+y+'");\n}\n'}x.appendChild(v.createTextNode(t+q));u.getElementsByTagName("defs")[0].appendChild(x)}null!=l&&(this.stylesheet=l,this.refresh());return u};var x=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=x.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
 (mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var e=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=c.innerHTML&&(e=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=e)}}else d.apply(this,arguments)}}return a};var B=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
 function(){B.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&
 this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==
@@ -9056,20 +9055,20 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo
 "/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
 [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
 [SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var D=mxMarker.createMarker;mxMarker.createMarker=
-function(a,d,b,c,e,g,m,f,n,k){if(null!=b&&null==mxMarker.markers[b]){var p=this.getPackageForType(b);null!=p&&mxStencilRegistry.getStencil(p)}return D.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){u.value=Math.max(1,Math.min(f,Math.max(parseInt(u.value),parseInt(v.value))));v.value=Math.max(1,Math.min(f,Math.min(parseInt(u.value),parseInt(v.value))))}function c(d){function b(d,b,g){var m=d.useCssTransforms,f=d.currentTranslate,n=d.currentScale,k=d.view.translate,p=
-d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var l=d.getGraphBounds(),v=0,u=0,x=pa.get(),t=1/d.pageScale,C=B.checked;if(C)var t=parseInt(K.value),y=parseInt(ka.value),t=Math.min(x.height*y/(l.height/d.view.scale),x.width*t/(l.width/d.view.scale));else t=parseInt(q.value)/(100*d.pageScale),isNaN(t)&&(c=1/d.pageScale,q.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*
-c);x.height=Math.ceil(x.height*c);t*=c;!C&&d.pageVisible?(l=d.getPageLayout(),v-=l.x*x.width,u-=l.y*x.height):C=!0;if(null==b){b=PrintDialog.createPrintPreview(d,t,x,0,v,u,C);b.pageSelector=!1;b.mathEnabled=!1;v=a.getCurrentFile();null!=v&&(b.title=v.getTitle());var z=b.writeHead;b.writeHead=function(b){z.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var e=
+function(a,d,b,c,e,g,m,f,n,k){if(null!=b&&null==mxMarker.markers[b]){var p=this.getPackageForType(b);null!=p&&mxStencilRegistry.getStencil(p)}return D.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){v.value=Math.max(1,Math.min(f,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(f,Math.min(parseInt(v.value),parseInt(u.value))))}function c(d){function b(d,b,g){var m=d.useCssTransforms,f=d.currentTranslate,n=d.currentScale,k=d.view.translate,p=
+d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var l=d.getGraphBounds(),u=0,v=0,x=pa.get(),t=1/d.pageScale,C=B.checked;if(C)var t=parseInt(K.value),y=parseInt(ka.value),t=Math.min(x.height*y/(l.height/d.view.scale),x.width*t/(l.width/d.view.scale));else t=parseInt(q.value)/(100*d.pageScale),isNaN(t)&&(c=1/d.pageScale,q.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*
+c);x.height=Math.ceil(x.height*c);t*=c;!C&&d.pageVisible?(l=d.getPageLayout(),u-=l.x*x.width,v-=l.y*x.height):C=!0;if(null==b){b=PrintDialog.createPrintPreview(d,t,x,0,u,v,C);b.pageSelector=!1;b.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(b.title=u.getTitle());var z=b.writeHead;b.writeHead=function(b){z.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var e=
 d.extFonts[c].name,g=d.extFonts[c].url;0==g.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+g+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+e+'";\n\tsrc: url("'+g+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var D=b.renderPage;b.renderPage=function(d,b,c,e,g,m){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
-var n=D.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}v=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(v=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());b.open(null,null,g,!0);null!=v&&(e.stylesheet=v,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";b.backgroundColor=x;b.autoOrigin=C;b.appendGraph(d,t,v,u,g,!0);if(null!=d.extFonts&&null!=b.wnd)for(g=
-0;g<d.extFonts.length;g++)v=d.extFonts[g].name,u=d.extFonts[g].url,0==u.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+u+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+v+'";\n\tsrc: url("'+u+'");\n}'),b.wnd.document.writeln("</style>"))}m&&(d.useCssTransforms=m,d.currentTranslate=f,d.currentScale=n,d.view.translate=k,d.view.scale=p);return b}var c=parseInt(ia.value)/
-100;isNaN(c)&&(c=1,ia.value="100 %");var c=.75*c,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=v.value,f=u.value,k=!p.checked,l=null;k&&(k=m==n&&f==n);if(!k&&null!=a.pages&&a.pages.length){var x=0,k=a.pages.length-1;p.checked||(x=parseInt(m)-1,k=parseInt(f)-1);for(var t=x;t<=k;t++){var C=a.pages[t],m=C==a.currentPage?e:null;if(null==m){var m=a.createTemporaryGraph(e.stylesheet),f=!0,x=!1,y=null,z=null;null==C.viewState&&
+var n=D.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}u=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());b.open(null,null,g,!0);null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";b.backgroundColor=x;b.autoOrigin=C;b.appendGraph(d,t,u,v,g,!0);if(null!=d.extFonts&&null!=b.wnd)for(g=
+0;g<d.extFonts.length;g++)u=d.extFonts[g].name,v=d.extFonts[g].url,0==v.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+v+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+u+'";\n\tsrc: url("'+v+'");\n}'),b.wnd.document.writeln("</style>"))}m&&(d.useCssTransforms=m,d.currentTranslate=f,d.currentScale=n,d.view.translate=k,d.view.scale=p);return b}var c=parseInt(ia.value)/
+100;isNaN(c)&&(c=1,ia.value="100 %");var c=.75*c,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=u.value,f=v.value,k=!p.checked,l=null;k&&(k=m==n&&f==n);if(!k&&null!=a.pages&&a.pages.length){var x=0,k=a.pages.length-1;p.checked||(x=parseInt(m)-1,k=parseInt(f)-1);for(var t=x;t<=k;t++){var C=a.pages[t],m=C==a.currentPage?e:null;if(null==m){var m=a.createTemporaryGraph(e.stylesheet),f=!0,x=!1,y=null,z=null;null==C.viewState&&
 null==C.root&&a.updatePageRoot(C);null!=C.viewState&&(f=C.viewState.pageVisible,x=C.viewState.mathEnabled,y=C.viewState.background,z=C.viewState.backgroundImage,m.extFonts=C.viewState.extFonts);m.background=y;m.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;m.pageVisible=f;m.mathEnabled=x;var D=m.getGlobalVariable;m.getGlobalVariable=function(d){return"page"==d?C.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(m.container);
 a.updatePageRoot(C);m.model.setRoot(C.root)}l=b(m,l,t!=k);m!=e&&m.container.parentNode.removeChild(m.container)}}else l=b(e);null==l?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(l.mathEnabled&&(k=l.wnd.document,k.writeln('<script type="text/x-mathjax-config">'),k.writeln("MathJax.Hub.Config({"),k.writeln("showMathMenu: false,"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/SVG"],'),k.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
 k.writeln("TeX: {"),k.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),k.writeln("},"),k.writeln("SVG: {"),k.writeln('font: "'+(null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX")+'"'),k.writeln("},"),k.writeln("tex2jax: {"),k.writeln('ignoreClass: "geDisableMathJax"'),k.writeln("},"),k.writeln("asciimath2jax: {"),k.writeln('ignoreClass: "geDisableMathJax"'),k.writeln("}"),k.writeln("});"),d&&(k.writeln("MathJax.Hub.Queue(function () {"),
 k.writeln("window.print();"),k.writeln("});")),k.writeln("\x3c/script>"),k.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),l.closeDocument(),!l.mathEnabled&&d&&PrintDialog.printPreview(l));null!=g&&(e.stylesheet=g,e.refresh())}var e=a.editor.graph,g=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,d||mxResources.get("print"));g.appendChild(m);var f=1,n=1,k=
 document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","all");p.setAttribute("type","radio");p.setAttribute("name","pages-printdialog");k.appendChild(p);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));k.appendChild(m);mxUtils.br(k);var l=p.cloneNode(!0);p.setAttribute("checked","checked");
-l.setAttribute("value","range");k.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");k.appendChild(m);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";k.appendChild(v);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));k.appendChild(m);var u=v.cloneNode(!0);k.appendChild(u);mxEvent.addListener(v,"focus",
-function(){l.checked=!0});mxEvent.addListener(u,"focus",function(){l.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(u,"change",b);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){n=m+1;v.value=n;u.value=n;break}v.setAttribute("max",f);u.setAttribute("max",f);1<f&&g.appendChild(k);var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value",
+l.setAttribute("value","range");k.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");k.appendChild(m);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";k.appendChild(u);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));k.appendChild(m);var v=u.cloneNode(!0);k.appendChild(v);mxEvent.addListener(u,"focus",
+function(){l.checked=!0});mxEvent.addListener(v,"focus",function(){l.checked=!0});mxEvent.addListener(u,"change",b);mxEvent.addListener(v,"change",b);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){n=m+1;u.value=n;v.value=n;break}u.setAttribute("max",f);v.setAttribute("max",f);1<f&&g.appendChild(k);var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value",
 "adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));x.appendChild(m);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";x.appendChild(q);mxEvent.addListener(q,"focus",function(){t.checked=!0});g.appendChild(x);var k=k.cloneNode(!1),B=t.cloneNode(!0);B.setAttribute("value","fit");t.setAttribute("checked",
 "checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(B);k.appendChild(m);x=document.createElement("table");x.style.display="inline-block";var C=document.createElement("tbody"),y=document.createElement("tr"),z=y.cloneNode(!0),D=document.createElement("td"),A=D.cloneNode(!0),F=D.cloneNode(!0),J=D.cloneNode(!0),E=D.cloneNode(!0),G=D.cloneNode(!0);D.style.textAlign="right";J.style.textAlign="right";mxUtils.write(D,
 mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";A.appendChild(K);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));F.appendChild(m);mxUtils.write(J,mxResources.get("fitToBy"));var ka=K.cloneNode(!0);E.appendChild(ka);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(ka,"focus",
@@ -9079,164 +9078,165 @@ k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.classNa
 "print":"ok"),function(){a.hideDialog();c(!0)});x.className="geBtn gePrimaryBtn";m.appendChild(x);a.editor.cancelFirst||m.appendChild(k);g.appendChild(m);this.container=g};var F=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)):(F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
 this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var G=document.createElement("canvas"),E=new Image;E.onload=function(){try{G.getContext("2d").drawImage(E,0,0);var a=G.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};E.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(J){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.0.3";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.0.4";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
 "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
 !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
 topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
-null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=d+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(u){}try{l||null==window.console||
-console.error(k,a,b,c,e,f)}catch(u){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>
+null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=d+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(v){}try{l||null==window.console||
+console.error(k,a,b,c,e,f)}catch(v){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>
 b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(m){}};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=g;g+=d;return a.substring(b,
 g)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var g=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var m=d(a,4);if(null!=b&&b(g-8,m,c))break;value=d(a,c);d(a,4);if("IEND"==m)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};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.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;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.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}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&&6<a.length}catch(v){}};c.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(p){}try{b=
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}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&&6<a.length}catch(u){}};c.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(p){}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(p){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};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.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
 function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,g){var m=!1;this.active||(e.call(this,c),this.active=!0,null!=g&&(m=document.createElement("div"),m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily="Helvetica, Arial",m.style.fontSize=
 "9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,a)+"px",m.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(m.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=g.substring(g.length-3,g.length)&&"!"!=g.charAt(g.length-1)&&(g+="..."),m.innerHTML=g,c.appendChild(m),d.status=m,mxClient.IS_VML&&
 (null==document.documentMode||8>=document.documentMode)&&(m.style.left=Math.round(Math.max(0,a-m.offsetWidth/2))+"px",m.style.top=Math.round(Math.max(0,b+70-m.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,g)}));this.stop();return a}),m=!0);return m};var g=d.stop;d.stop=function(){g.call(this);this.active=!1;null!=d.status&&null!=d.status.parentNode&&d.status.parentNode.removeChild(d.status);d.status=null};
-d.pause=function(){return function(){}};return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
-80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=
-a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(d),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=k?mxUtils.getXml(k):""}catch(t){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=
-a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||
-1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(c[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,f,0==e?f: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])),d.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++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,f,k,l,q,u,z,y){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;u=null!=u?u:!0;var d,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?
-d="_blank":g=d=e;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){if(y){var n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());n.appendChild(a)}else{n=Graph.zapGremlins(mxUtils.getXml(a));m=Graph.compress(n);if(Graph.decompress(m)!=n)return n;n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,m)}m=a.ownerDocument.createElement("mxfile");m.appendChild(n)}z?(m=m.cloneNode(!0),m.removeAttribute("modified"),
-m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",
-(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));y=y?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!k&&!f&&(l||null!=c&&/(\.html)$/i.test(c.getTitle())))y=this.getHtml2(mxUtils.getXml(m),b,null!=c?c.getTitle():null,d,g);else if(k||
-!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),y=this.getEmbeddedSvg(y,b,e,null,q,u,g);return y};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
-a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var e=
-(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,e);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(e));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var d=[],c=0;c<a.length;c++){var e=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=
-e?d.push(String.fromCharCode(65+Math.round(25*Math.random()))):e.toUpperCase()!=e?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(e)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",
-this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(b)}catch(v){a[EditorUi.DIFF_INSERT][d].data=v.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(d=mxUtils.bind(this,function(a){var d=e.cells[a];if(null!=d){for(var b in d)null!=d[b].value&&(d[b].value="["+d[b].value.length+"]"),null!=d[b].xmlValue&&(d[b].xmlValue="["+d[b].xmlValue.length+
-"]"),null!=d[b].style&&(d[b].style="["+d[b].style.length+"]"),0==Object.keys(d[b]).length&&delete d[b];0==Object.keys(d).length&&delete e.cells[a]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var d=0;d<a.attributes.length;d++)"as"!=
-a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("xmlValue")&&d[c].setAttribute("xmlValue","["+d[c].getAttribute("xmlValue").length+
-"]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&d.invalidChecksum?
-d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),a?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,e,f,k,l,
-q,u,z){f=null!=f?f:!0;k=null!=k?k:!1;var d=this.editor.graph;if(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))if(z=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}l=null!=l?l:this.getXmlFileData(f,k,z);u=null!=u?u:this.getCurrentFile();a=this.createFileData(l,
-d,u,window.location.href,a,b,c,e,f,q,z);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,f,k){k=null!=k?k:!0;var d=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=k?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),m=b.view.scale;k=Math.floor(d.x/m-b.view.translate.x);m=Math.floor(d.y/m-b.view.translate.y);d=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(g=EditorUi.drawHost+
-"/embed.js?s="+b));a.setAttribute("x0",k);a.setAttribute("y0",m)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+
-(null==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,f){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
-toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":
-"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==f?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=
-this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a&&"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var b=null;this.fileNode=
-a;this.pages=[];for(var c=0;c<d.length;c++)null==d[c].getAttribute("id")&&d[c].setAttribute("id",c),a=new DiagramPage(d[c]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var f=this.editor.graph.getModel(),k=f.getChildren(f.root),c=0;c<k.length;c++){var l=k[c];f.setVisible(l,a[l.id]||
-!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};
-EditorUi.prototype.downloadFile=function(a,b,c,e,f,k,l,q,u,z,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!f),g=d+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,f,null,null,null,b);this.saveData(g,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(g,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-a?g=d+".png":"jpeg"==a&&(g=d+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var g=this.createDownloadRequest(d,a,e,b,l,f,q,u,z,y);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var n=null,p=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var v=this.editor.graph.background;if(l||v==mxConstants.NONE)v=null;var t=this.editor.graph.getSvg(v,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(t);this.editor.convertImages(t,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=d+".svg",
-n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),e)}}catch(E){this.handleError(E)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,f,k,l,q,u,z){var d=this.editor.graph,g=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==k?!1:"xmlpng"!=b);var m="",n="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};z=z?"1":"0";"pdf"==b&&0==k&&(n="&allPages=1");if("xmlpng"==b&&(z="1",b="png",null!=
-this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=d.background;"png"==b&&f?k=mxConstants.NONE:f||null!=k&&k!=mxConstants.NONE||(k="#ffffff");f={globalVars:d.getExportVariables()};u&&(f.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+m+n+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+z+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):
-"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=l?"&scale="+l:"")+(null!=q?"&border="+q:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,e=mxUtils.bind(this,function(c){var e=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<e.length&&(e+="\n"),e+=c);c=new LocalFile(this,"csv"!=a.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
-c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(e,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var g=null!=a.interval?parseInt(a.interval):6E4,m=null,f=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?
-(this.updateDiagram(a.getText()),k()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(f,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();f()}));k();f()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var g=a.url;/^https?:\/\//.test(g)&&!this.editor.isCorsEnabledForUrl(g)&&(g=PROXY_URL+"?url="+encodeURIComponent(g));this.editor.loadUrl(g,
-mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else e("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,f=e.getModel();f.beginUpdate();var k=
-null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var l=f.getCell(a.getAttribute("id"));if(null!=l){try{var u=a.getAttribute("value");if(null!=u){var z=mxUtils.parseXml(u).documentElement;if(null!=z)if("1"==z.getAttribute("replace-value"))f.setValue(l,z);else for(var y=z.attributes,A=0;A<y.length;A++)e.setAttributeForCell(l,y[A].nodeName,0<y[A].nodeValue.length?y[A].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+l.id+": "+J)}try{var x=a.getAttribute("style");
-null!=x&&e.model.setStyle(l,x)}catch(J){null!=window.console&&console.log("Error in style for "+l.id+": "+J)}try{var B=a.getAttribute("icon");if(null!=B){var C=0<B.length?JSON.parse(B):null;null!=C&&C.append||e.removeCellOverlays(l);null!=C&&e.addCellOverlay(l,d(C))}}catch(J){null!=window.console&&console.log("Error in icon for "+l.id+": "+J)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),F=e.getCellGeometry(l);if(null!=F){F=F.clone();for(key in D){var G=parseFloat(D[key]);"dx"==
-key?F.x+=G:"dy"==key?F.y+=G:"dw"==key?F.width+=G:"dh"==key?F.height+=G:F[key]=parseFloat(D[key])}e.model.setGeometry(l,F)}}}catch(J){null!=window.console&&console.log("Error in icon for "+l.id+": "+J)}}}else if("model"==a.nodeName){for(var E=a.firstChild;null!=E&&E.nodeType!=mxConstants.NODETYPE_ELEMENT;)E=E.nextSibling;null!=E&&(new mxCodec(a.firstChild)).decode(E,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=
-new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",e=d.lastIndexOf(".");0<=e&&(c=d.substring(e),d=d.substring(0,e));if(b)var g=new Date,e=g.getFullYear(),
-f=g.getMonth()+1,k=g.getDate(),l=g.getHours(),z=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+f+"-"+k+"-"+l+"-"+z+"-"+g));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,
-function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&
-"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&
-a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=
-t;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():"none"),action:"message_"+t.message,label:"stack_"+t.stack})}catch(q){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});b?g():this.handleError(t,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return c};EditorUi.prototype.getHashValueForPages=
-function(a,b){var d=0,c=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var g=0;g<a.length;g++){this.updatePageRoot(a[g]);var f=a[g].node.cloneNode(!1);f.removeAttribute("name");c.root=a[g].root;var k=e.encode(c);this.editor.graph.saveViewState(a[g].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");f.appendChild(k);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);
-d=(d<<5)-d+this.hashValue(f,function(a,d,b,c){return!c||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?c&&"mxCell"==a.nodeName&&"previous"==d?null:b:Math.round(b)},b)<<0}return d};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=
-a.attributes.length);for(var e=0;e<a.attributes.length;e++){var g=a.attributes[e].name,m=null!=b?b(a,g,a.attributes[e].value,!0):a.attributes[e].value;null!=m&&(d^=this.hashValue(g,b,c)+this.hashValue(m,b,c))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)d=(d<<5)-d+this.hashValue(a.childNodes[e],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=
-function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,f,k,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
-EditorUi.prototype.createLibraryDataFromImages=function(a){var d=mxUtils.createXmlDocument(),b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var d=this.sidebar.palettes[a];
-if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a,b){var d=
-mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,c,d.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=
-a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=null,f=mxUtils.bind(this,function(d,b){0==d.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),b.appendChild(g)):this.addLibraryEntries(d,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),
-c,null!=e?e:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var k=m.parentNode.previousSibling;e=k.getAttribute("title");null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var l=document.createElement("img");
-l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle");l.setAttribute("border","0");l.style.cursor="pointer";l.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),
-mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var x=this.editor.graph,B=null,C=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=l.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",
-B.style.marginTop="-2px",n.insertBefore(B,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=l.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),k.style.paddingRight=18*n.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,d,c,e){a=x.cloneCells(mxUtils.sortCells(x.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var k=x.getCellGeometry(a[f]);null!=k&&k.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,
-d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);D(c);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),G=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=x.getSelectionCells(),
-b=x.view.getBounds(d),c=x.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=x.view.translate.x;b.y-=x.view.translate.y;F(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.first&&(x.graphHandler.suspend(),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,mxEvent.consume(a))}),
-mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(m.style.backgroundColor="",m.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.first&&(x.graphHandler.resume(),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor=
-"",m.style.cursor="",x.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,
-c,e,k,n,l,p,x,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,l),d)],d[0].vertex=!0,F(d,new mxRectangle(0,0,n,l),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var v=!1,t=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==
-c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var k=JSON.parse(mxUtils.getTextContent(e.documentElement));f(k,m);b=b.concat(k);D(a);this.spinner.stop();v=!0}catch(N){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var l=this.stringToCells(Editor.getDiagramNodeXml(n[k])),p=this.editor.graph.getBoundingBoxFromGeometry(l);
-F(l,new mxRectangle(0,0,p.width,p.height),a)}v=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=u&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(u,function(a){t(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,
-p)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?t(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",
-Editor.editImage);l.setAttribute("title",mxResources.get("edit"));n.insertBefore(l,n.firstChild);mxEvent.addListener(l,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==m&&C(a)});e=l.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",
-mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),n.insertBefore(e,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],e=c.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==c.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(e=this.stringToCells(Graph.decompress(c.xml)),0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=
-64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),
-Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&
-(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
-EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,e,f){a=new ImageDialog(this,a,b,c,e,f);this.showDialog(a.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,
-200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,f){a=new LibraryDialog(this,a,b,c,e,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));
-return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":
-"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,f,k,l){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+
-(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=g||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),n=null;b=null!=b?b:mxResources.get("error");if(null!=g){null!=g.retry&&(m=mxResources.get("cancel"),n=function(){d();g.retry()});if(404==g.code||404==g.status||403==g.code){l=403==g.code?null!=g.message?mxUtils.htmlEntities(g.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=k?k:window.location.hash;if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==g.code||404==g.status)){p="#U"==p.substring(0,2)?
-p.substring(45,p.lastIndexOf("%26ex")):p.substring(2);this.showError(b,l,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(a,b,c,e,f)}),n,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<b.length;a++){var d=document.createElement("option");mxUtils.write(d,b[a].displayName);d.value=a;e.appendChild(d);d=document.createElement("option");d.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(d,"<"+b[a].email+">");d.setAttribute("disabled","disabled");e.appendChild(d)}d=document.createElement("option");mxUtils.write(d,mxResources.get("addAccount"));d.value=b.length;e.appendChild(d)}var b=this.drive.getUsersList(),d=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");d.appendChild(c);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,
-function(){var d=e.value,c=b.length!=d;c&&this.drive.setUser(b[d]);this.drive.authorize(c,mxUtils.bind(this,function(){c||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(d.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=g.message?
-l=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?l=mxUtils.htmlEntities(g.response.error):"undefined"!==typeof window.App&&(g.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=k=null;null!=g&&null!=g.helpLink&&(k=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(b,l,m,c,n,null,null,k,x,null,null,null,
-e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,f,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,f,null,null,null,null,g);this.showDialog(a.container,340,46+
-g,!0,k);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");
-mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",
-mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(d);mxUtils.write(e,b);document.body.appendChild(e);this.bannerShowing=!0;var g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","geDoNotShowAgainCheckbox");f.style.marginRight=
-"6px";g.appendChild(f);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));g.appendChild(b);e.style.paddingBottom="30px";e.appendChild(g);var m=mxUtils.bind(this,function(b){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,f.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(d,"click",
-mxUtils.bind(this,function(a){mxEvent.consume(a);m()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);d!=f&&d!=b&&(mxEvent.consume(a),c(),m())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m(!0)}),1E3)}),3E4);d=!0}return d};
-EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,c,e){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(b)));
-0<e&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",e));return d};EditorUi.prototype.saveCanvas=function(a,b,c,e,f){var d="jpeg"==c?"jpg":c;e=this.getBaseFilename(e)+"."+d;a=this.createImageDataUri(a,b,c,f);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&
-!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,f){"text/xml"!=c||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b+=".drawio");if(window.Blob&&
-navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,e);else{var d=document.createElement("a"),g=(null==navigator.userAgent||
-0>navigator.userAgent.indexOf("PaleMoon/"))&&!mxClient.IS_IOS&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent)var m=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),g=65==(m?parseInt(m[2],10):!1)?!1:g;if(g||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));g?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(u){}}else this.createEchoRequest(a,
-b,c,e,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,f,k){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=k?"&base64="+k:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),g=Array(e),f=0;f<e;++f){for(var k=1024*f,l=Math.min(k+1024,c),z=Array(l-k),y=0;k<l;++y,++k)z[y]=
-d[k].charCodeAt(0);g[f]=new Uint8Array(z)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,f,k,l){k=null!=k?k:!1;l=null!=l?l:"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(k);isLocalStorage&&f++;var d=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){try{if("_blank"==d)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,e);else{var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write("<pre>"+
-mxUtils.htmlEntities(a,!1)+"</pre>"),g.document.close())}else d==App.MODE_DEVICE||"download"==d?this.doSaveLocalFile(a,b,c,e):null!=b&&0<b.length&&this.pickFolder(d,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,e,d,g)}catch(x){this.handleError(x)}}))}catch(A){this.handleError(A)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,l,null,1<f,d,a,c,e);k=this.isServices(f)?f>d?390:270:160;this.showDialog(b.container,400,k,!0,!0);b.init()};
-EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):(a=c?a:btoa(unescape(encodeURIComponent(a))),d.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),d.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;
-EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var c=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=c.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=c.zIndex;var e=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});e.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){e.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.style.backgroundColor="white";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);d.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",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}c.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,f){this.isLocalFileSave()?this.saveLocalFile(c,a,e,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,f,b,d)}),c,f,e)};EditorUi.prototype.saveRequest=function(a,
-b,c,e,f,k,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var g=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var g=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=g&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?g.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){k=null!=k?k:"pdf"==b?"application/pdf":"image/"+
-b;if(null!=e)try{this.exportFile(e,a,k,!0,d,c)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),a,k,!0,d,c)}catch(B){this.handleError(B)}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,l,null,1<d,g,e,k,f);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,f,k){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,f,k,l,q,u,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=
-this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var m=this.editor.graph.getSvg(g,a,l,q,null,c,null,null,"blank"==z?"_blank":"self"==z?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(m);var n=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(m);this.editor.graph.mathEnabled&&this.editor.addMathCss(m);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(m,p,this.thumbImageCache)):p(m)}catch(D){this.handleError(D)}};EditorUi.prototype.addRadiobox=
-function(a,b,c,e,f,k,l){return this.addCheckbox(a,c,e,f,k,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,f,k,l,q){k=null!=k?k:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();d.id=l;null!=q&&d.setAttribute("name",q);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");k&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,
-b),c.setAttribute("for",l),a.appendChild(c),f||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";c=document.createElement("option");
-c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));g.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");g.appendChild(c);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,
-300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){f.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?
-"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));c.appendChild(e);e=document.createElement("option");
-e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));c.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",f=
-null,f=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;d()});mxEvent.consume(a)}));d();f.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return c.value},focus:function(){c.focus()}}};
-EditorUi.prototype.createLink=function(a,b,c,e,f,k,l,q){var d=this.getCurrentFile(),g=[];e&&(g.push("lightbox=1"),"auto"!=a&&g.push("target="+a),null!=b&&b!=mxConstants.NONE&&g.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&g.push("edit="+encodeURIComponent(f)),k&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&g.push("page-id="+this.currentPage.getId());a=!0;null!=l?c=
-"#U"+encodeURIComponent(l):(d=this.getCurrentFile(),q||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
-"https://"+window.location.host)+"/"+(0<g.length?"?"+g.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,f,k,l,q,u,z,y){this.getBasenames();var d={};""!=f&&f!=mxConstants.NONE&&(d.highlight=f);"auto"!==e&&(d.target=e);u||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];l&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);
-q&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),d.toolbar=c.join(" "));null!=z&&0<z.length&&(d.edit=z);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
-EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var f=document.createElement("div");
-f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");g=k.cloneNode(!0);g.setAttribute("value","copy");f.appendChild(g);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));f.appendChild(m);mxUtils.br(f);f.appendChild(k);
-m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));f.appendChild(m);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),f.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));g.setAttribute("checked",
-"checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(f);var n=this.addLinkSection(d),A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value="100%";d.appendChild(x);var B=this.addCheckbox(d,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(d,mxResources.get("allPages"),
-f,!f),D=this.addCheckbox(d,mxResources.get("layers"),!0),F=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addEditButton(d,F),E=G.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");E.checked&&F.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,A.checked,
-x.value,n.getTarget(),n.getColor(),B.checked,C.checked,D.checked,F.checked,G.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var m=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";
-a=0;if(null!=m&&m.constructor==window.DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));l.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));
+d.pause=function(){return function(){}};return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
+80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
+EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,
+">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(d),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=k?mxUtils.getXml(k):""}catch(t){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
+function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(c[e]));
+null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,f,0==e?f: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])),d.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++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,f,k,l,q,v,z,y){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;v=null!=v?v:!0;var d,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?d="_blank":g=d=e;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){if(y){var n=a.ownerDocument.createElement("diagram");n.setAttribute("id",
+Editor.guid());n.appendChild(a)}else{n=Graph.zapGremlins(mxUtils.getXml(a));m=Graph.compress(n);if(Graph.decompress(m)!=n)return n;n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,m)}m=a.ownerDocument.createElement("mxfile");m.appendChild(n)}z?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),
+m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),
+a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));y=y?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!k&&!f&&(l||null!=c&&/(\.html)$/i.test(c.getTitle())))y=this.getHtml2(mxUtils.getXml(m),b,null!=c?c.getTitle():null,d,g);else if(k||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),y=this.getEmbeddedSvg(y,b,
+e,null,q,v,g);return y};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):
+(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
+e);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(e));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var d=[],c=0;c<a.length;c++){var e=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*Math.random()))):e.toUpperCase()!=e?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(e)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(b)}catch(u){a[EditorUi.DIFF_INSERT][d].data=
+u.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(d=mxUtils.bind(this,function(a){var d=e.cells[a];if(null!=d){for(var b in d)null!=d[b].value&&(d[b].value="["+d[b].value.length+"]"),null!=d[b].xmlValue&&(d[b].xmlValue="["+d[b].xmlValue.length+"]"),null!=d[b].style&&(d[b].style="["+d[b].style.length+"]"),0==Object.keys(d[b]).length&&delete d[b];0==Object.keys(d).length&&
+delete e.cells[a]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var d=0;d<a.attributes.length;d++)"as"!=a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=
+0;d<a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("xmlValue")&&d[c].setAttribute("xmlValue","["+d[c].getAttribute("xmlValue").length+"]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=
+d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&d.invalidChecksum?d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),
+this.editor.setStatus(""),a?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,e,f,k,l,q,v,z){f=null!=f?f:!0;k=null!=k?k:!1;var d=this.editor.graph;if(b||!a&&null!=v&&/(\.svg)$/i.test(v.getTitle()))if(z=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}l=null!=l?l:this.getXmlFileData(f,k,z);v=null!=v?v:this.getCurrentFile();a=this.createFileData(l,d,v,window.location.href,a,b,c,e,f,q,z);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);
+return a};EditorUi.prototype.getHtml=function(a,b,c,e,f,k){k=null!=k?k:!0;var d=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=k?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),m=b.view.scale;k=Math.floor(d.x/m-b.view.translate.x);m=Math.floor(d.y/m-b.view.translate.y);d=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(g=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",k);a.setAttribute("y0",m)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,f){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==
+f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+
+'"></div>\n'+(null==f?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=Editor.extractParserError(a,
+mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a&&"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var c=0;c<d.length;c++)null==d[c].getAttribute("id")&&d[c].setAttribute("id",c),a=new DiagramPage(d[c]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",
+[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var f=this.editor.graph.getModel(),k=f.getChildren(f.root),c=0;c<k.length;c++){var l=k[c];f.setVisible(l,a[l.id]||!1)}}catch(v){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||
+/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(a,b,c,e,f,k,l,q,v,z,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!f),g=d+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+
+this.getFileData(!0,null,null,null,e,f,null,null,null,b);this.saveData(g,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(g,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=d+".png":"jpeg"==a&&(g=d+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var g=this.createDownloadRequest(d,
+a,e,b,l,f,q,v,z,y);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var n=null,p=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var u=this.editor.graph.background;if(l||u==mxConstants.NONE)u=null;var t=this.editor.graph.getSvg(u,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(t);
+this.editor.convertImages(t,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),e)}}catch(E){this.handleError(E)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,f,k,l,q,v,z){var d=this.editor.graph,g=d.getGraphBounds();
+c=this.getFileData(!0,null,null,null,c,0==k?!1:"xmlpng"!=b);var m="",n="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};z=z?"1":"0";"pdf"==b&&0==k&&(n="&allPages=1");if("xmlpng"==b&&(z="1",b="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=d.background;"png"==b&&f?k=mxConstants.NONE:f||null!=k&&k!=mxConstants.NONE||(k="#ffffff");f={globalVars:d.getExportVariables()};
+v&&(f.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+m+n+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+z+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=l?"&scale="+l:"")+(null!=q?"&border="+q:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,
+e=mxUtils.bind(this,function(c){var e=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<e.length&&(e+="\n"),e+=c);c=new LocalFile(this,"csv"!=a.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(e,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var g=null!=a.interval?
+parseInt(a.interval):6E4,m=null,f=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),k()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(f,
+g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();f()}));k();f()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var g=a.url;/^https?:\/\//.test(g)&&!this.editor.isCorsEnabledForUrl(g)&&(g=PROXY_URL+"?url="+encodeURIComponent(g));this.editor.loadUrl(g,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else e("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,
+a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,f=e.getModel();f.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var l=f.getCell(a.getAttribute("id"));if(null!=l){try{var v=a.getAttribute("value");if(null!=v){var z=mxUtils.parseXml(v).documentElement;if(null!=z)if("1"==z.getAttribute("replace-value"))f.setValue(l,
+z);else for(var y=z.attributes,A=0;A<y.length;A++)e.setAttributeForCell(l,y[A].nodeName,0<y[A].nodeValue.length?y[A].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+l.id+": "+J)}try{var x=a.getAttribute("style");null!=x&&e.model.setStyle(l,x)}catch(J){null!=window.console&&console.log("Error in style for "+l.id+": "+J)}try{var B=a.getAttribute("icon");if(null!=B){var C=0<B.length?JSON.parse(B):null;null!=C&&C.append||e.removeCellOverlays(l);null!=C&&e.addCellOverlay(l,
+d(C))}}catch(J){null!=window.console&&console.log("Error in icon for "+l.id+": "+J)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),F=e.getCellGeometry(l);if(null!=F){F=F.clone();for(key in D){var G=parseFloat(D[key]);"dx"==key?F.x+=G:"dy"==key?F.y+=G:"dw"==key?F.width+=G:"dh"==key?F.height+=G:F[key]=parseFloat(D[key])}e.model.setGeometry(l,F)}}}catch(J){null!=window.console&&console.log("Error in icon for "+l.id+": "+J)}}}else if("model"==a.nodeName){for(var E=a.firstChild;null!=
+E&&E.nodeType!=mxConstants.NODETYPE_ELEMENT;)E=E.nextSibling;null!=E&&(new mxCodec(a.firstChild)).decode(E,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=
+k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",e=d.lastIndexOf(".");0<=e&&(c=d.substring(e),d=d.substring(0,e));if(b)var g=new Date,e=g.getFullYear(),f=g.getMonth()+1,k=g.getDate(),l=g.getHours(),z=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+f+"-"+k+"-"+l+"-"+z+"-"+g));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=
+this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&
+0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);
+a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||
+this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":
+"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=t;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():"none"),action:"message_"+t.message,label:"stack_"+
+t.stack})}catch(q){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});b?g():this.handleError(t,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var g=0;g<a.length;g++){this.updatePageRoot(a[g]);
+var f=a[g].node.cloneNode(!1);f.removeAttribute("name");c.root=a[g].root;var k=e.encode(c);this.editor.graph.saveViewState(a[g].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");f.appendChild(k);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(f,function(a,d,b,c){return!c||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?c&&"mxCell"==a.nodeName&&
+"previous"==d?null:b:Math.round(b)},b)<<0}return d};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var g=a.attributes[e].name,m=null!=b?b(a,g,a.attributes[e].value,!0):a.attributes[e].value;null!=m&&(d^=this.hashValue(g,
+b,c)+this.hashValue(m,b,c))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)d=(d<<5)-d+this.hashValue(a.childNodes[e],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,f,k,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var d=mxUtils.createXmlDocument(),b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);
+return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;
+if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a,b){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,c,d.documentElement.getAttribute("title"),
+b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=null,f=mxUtils.bind(this,function(d,b){0==d.length&&a.isEditable()?
+(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),b.appendChild(g)):this.addLibraryEntries(d,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var k=m.parentNode.previousSibling;e=k.getAttribute("title");null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",
+this.getLibraryStorageHint(a)+"\n"+e);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle");l.setAttribute("border","0");l.style.cursor="pointer";l.style.margin=
+"0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var x=this.editor.graph,B=null,C=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),m,
+b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=l.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",n.insertBefore(B,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=
+B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=l.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+"px",A.parentNode.removeChild(A),
+A=null)});mxEvent.consume(d)})),k.style.paddingRight=18*n.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,d,c,e){a=x.cloneCells(mxUtils.sortCells(x.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var k=x.getCellGeometry(a[f]);null!=k&&k.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);D(c);null!=
+g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),G=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=x.getSelectionCells(),b=x.view.getBounds(d),c=x.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=x.view.translate.x;b.y-=x.view.translate.y;F(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,
+function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.first&&(x.graphHandler.suspend(),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(m.style.backgroundColor="",m.style.cursor="default",this.sidebar.showTooltips=!0,
+x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.first&&(x.graphHandler.resume(),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor="",m.style.cursor="",x.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect=
+"copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,k,n,l,p,x,v){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",
+new mxGeometry(0,0,n,l),d)],d[0].vertex=!0,F(d,new mxRectangle(0,0,n,l),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var u=!1,t=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var k=JSON.parse(mxUtils.getTextContent(e.documentElement));
+f(k,m);b=b.concat(k);D(a);this.spinner.stop();u=!0}catch(N){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var l=this.stringToCells(Editor.getDiagramNodeXml(n[k])),p=this.editor.graph.getBoundingBoxFromGeometry(l);F(l,new mxRectangle(0,0,p.width,p.height),a)}u=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(a){t(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?t(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));n.insertBefore(l,n.firstChild);mxEvent.addListener(l,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
+m&&C(a)});e=l.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),n.insertBefore(e,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],e=c.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(e=this.stringToCells(Graph.decompress(c.xml)),
+0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
+"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
+"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
+Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,e,f){a=new ImageDialog(this,a,b,c,e,f);this.showDialog(a.container,Graph.fileSupport?
+480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var d=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,f){a=new LibraryDialog(this,a,b,c,e,f);this.showDialog(a.container,640,440,!0,!1,
+mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position=
+"absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
+mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,f,k,l){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=g||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));
+var m=mxResources.get("ok"),n=null;b=null!=b?b:mxResources.get("error");if(null!=g){null!=g.retry&&(m=mxResources.get("cancel"),n=function(){d();g.retry()});if(404==g.code||404==g.status||403==g.code){l=403==g.code?null!=g.message?mxUtils.htmlEntities(g.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=
+null!=k?k:window.location.hash;if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==g.code||404==g.status)){p="#U"==p.substring(0,2)?p.substring(45,p.lastIndexOf("%26ex")):p.substring(2);this.showError(b,l,mxResources.get("openInNewWindow"),mxUtils.bind(this,
+function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(a,b,c,e,f)}),n,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<b.length;a++){var d=document.createElement("option");mxUtils.write(d,b[a].displayName);d.value=a;e.appendChild(d);d=document.createElement("option");d.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(d,"<"+b[a].email+">");d.setAttribute("disabled","disabled");e.appendChild(d)}d=document.createElement("option");
+mxUtils.write(d,mxResources.get("addAccount"));d.value=b.length;e.appendChild(d)}var b=this.drive.getUsersList(),d=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");d.appendChild(c);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var d=e.value,c=b.length!=d;c&&this.drive.setUser(b[d]);this.drive.authorize(c,mxUtils.bind(this,function(){c||
+(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(d.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=g.message?l=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?l=mxUtils.htmlEntities(g.response.error):"undefined"!==
+typeof window.App&&(g.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=k=null;null!=g&&null!=g.helpLink&&(k=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(b,l,m,c,n,null,null,k,x,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,
+340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,f,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,f,null,null,null,null,g);this.showDialog(a.container,340,46+g,!0,k);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&
+null!=mxSettings.settings["close"+a])){var e=document.createElement("div");e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";
+d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+e.appendChild(d);mxUtils.write(e,b);document.body.appendChild(e);this.bannerShowing=!0;var g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","geDoNotShowAgainCheckbox");f.style.marginRight="6px";g.appendChild(f);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));g.appendChild(b);
+e.style.paddingBottom="30px";e.appendChild(g);var m=mxUtils.bind(this,function(b){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,f.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);m()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);d!=f&&d!=b&&(mxEvent.consume(a),
+c(),m())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m(!0)}),1E3)}),3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,c,e){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",e));return d};EditorUi.prototype.saveCanvas=function(a,b,c,e,f){var d="jpeg"==c?"jpg":c;e=this.getBaseFilename(e)+"."+d;a=this.createImageDataUri(a,
+b,c,f);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width=
+"600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,f){"text/xml"!=c||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b+=".drawio");if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):
+(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,e);else{var d=document.createElement("a"),g=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&!mxClient.IS_IOS&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent)var m=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),
+g=65==(m?parseInt(m[2],10):!1)?!1:g;if(g||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));g?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(v){}}else this.createEchoRequest(a,b,c,e,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,f,k){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
+a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=k?"&base64="+k:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),g=Array(e),f=0;f<e;++f){for(var k=1024*f,l=Math.min(k+1024,c),z=Array(l-k),y=0;k<l;++y,++k)z[y]=d[k].charCodeAt(0);g[f]=new Uint8Array(z)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,f,k,l){k=null!=k?k:!1;l=null!=l?l:
+"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(k);isLocalStorage&&f++;var d=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){try{if("_blank"==d)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,e);else{var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),g.document.close())}else d==App.MODE_DEVICE||"download"==d?this.doSaveLocalFile(a,b,c,e):null!=b&&0<b.length&&
+this.pickFolder(d,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,e,d,g)}catch(x){this.handleError(x)}}))}catch(A){this.handleError(A)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,l,null,1<f,d,a,c,e);k=this.isServices(f)?f>d?390:270:160;this.showDialog(b.container,400,k,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=
+b||mxClient.IS_SVG?"image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):(a=c?a:btoa(unescape(encodeURIComponent(a))),d.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),d.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var d=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var c=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=c.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+c.zIndex;var e=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});e.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){e.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.style.backgroundColor="white";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);d.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",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+Editor.cameraLargeImage,mxResources.get("export"))}c.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,f){this.isLocalFileSave()?this.saveLocalFile(c,a,e,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,f,b,d)}),c,f,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,f,k,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var g=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
+function(a,d){if("_blank"==d||null!=a&&0<a.length){var g=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=g&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?g.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){k=null!=k?k:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,k,!0,d,c)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),a,k,!0,d,c)}catch(B){this.handleError(B)}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,l,null,1<d,g,e,k,f);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
+a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,f,k){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,f,k,l,q,v,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var m=this.editor.graph.getSvg(g,
+a,l,q,null,c,null,null,"blank"==z?"_blank":"self"==z?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(m);var n=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?
+this.saveData(n,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(m);this.editor.graph.mathEnabled&&this.editor.addMathCss(m);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(m,p,this.thumbImageCache)):p(m)}catch(D){this.handleError(D)}};EditorUi.prototype.addRadiobox=function(a,b,c,e,f,k,l){return this.addCheckbox(a,c,e,f,k,l,!0,
+b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,f,k,l,q){k=null!=k?k:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();d.id=l;null!=q&&d.setAttribute("name",q);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");k&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",l),a.appendChild(c),f||mxUtils.br(a));
+return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));
+g.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");g.appendChild(c);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",
+mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){f.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+
+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value",
+"blank");mxUtils.write(e,mxResources.get("openInNewWindow"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));c.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",f=null,f=mxUtils.button("",
+mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;d()});mxEvent.consume(a)}));d();f.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=
+function(a,b,c,e,f,k,l,q){var d=this.getCurrentFile(),g=[];e&&(g.push("lightbox=1"),"auto"!=a&&g.push("target="+a),null!=b&&b!=mxConstants.NONE&&g.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&g.push("edit="+encodeURIComponent(f)),k&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&g.push("page-id="+this.currentPage.getId());a=!0;null!=l?c="#U"+encodeURIComponent(l):(d=
+this.getCurrentFile(),q||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+
+"/"+(0<g.length?"?"+g.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,f,k,l,q,v,z,y){this.getBasenames();var d={};""!=f&&f!=mxConstants.NONE&&(d.highlight=f);"auto"!==e&&(d.target=e);v||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];l&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);q&&c.push("layers");0<c.length&&
+(v&&c.push("lightbox"),d.toolbar=c.join(" "));null!=z&&0<z.length&&(d.edit=z);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+
+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var f=document.createElement("div");f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";
+var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");g=k.cloneNode(!0);g.setAttribute("value","copy");f.appendChild(g);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));f.appendChild(m);mxUtils.br(f);f.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));
+f.appendChild(m);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),f.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));g.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(f);var n=
+this.addLinkSection(d),A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value="100%";d.appendChild(x);var B=this.addCheckbox(d,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(d,mxResources.get("allPages"),f,!f),D=this.addCheckbox(d,mxResources.get("layers"),!0),
+F=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addEditButton(d,F),E=G.getEditInput();E.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");E.checked&&F.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,A.checked,x.value,n.getTarget(),n.getColor(),B.checked,C.checked,
+D.checked,F.checked,G.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var m=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=
+m&&m.constructor==window.DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));l.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));
 n.style.marginTop="12px";n.className="geBtn";l.appendChild(n);d.appendChild(l);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));l.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,
 null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,x=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",d.appendChild(p),mxUtils.write(d,mxResources.get("height")+
-":"),x=document.createElement("input"),x.setAttribute("type","text"),x.style.width="50px",x.style.marginLeft="6px",x.style.marginBottom="10px",x.value=e+"px",d.appendChild(x),mxUtils.br(d);var v=this.addLinkSection(d,k);c=null!=this.pages&&1<this.pages.length;var C=null;if(null==m||m.constructor!=window.DriveFile||b)C=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,D),G=F.getEditInput(),E=this.addCheckbox(d,mxResources.get("layers"),
-!0);E.style.marginLeft=G.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"));G.checked&&D.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){f(v.getTarget(),v.getColor(),null==C?
-!0:C.checked,D.checked,F.getLink(),E.checked,null!=p?p.value:null,null!=x?x.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,
+":"),x=document.createElement("input"),x.setAttribute("type","text"),x.style.width="50px",x.style.marginLeft="6px",x.style.marginBottom="10px",x.value=e+"px",d.appendChild(x),mxUtils.br(d);var u=this.addLinkSection(d,k);c=null!=this.pages&&1<this.pages.length;var C=null;if(null==m||m.constructor!=window.DriveFile||b)C=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,D),G=F.getEditInput(),E=this.addCheckbox(d,mxResources.get("layers"),
+!0);E.style.marginLeft=G.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"));G.checked&&D.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){f(u.getTarget(),u.getColor(),null==C?
+!0:C.checked,D.checked,F.getLink(),E.checked,null!=p?p.value:null,null!=x?x.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,
 mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(f?"10":"4")+"px";d.appendChild(g);if(f){mxUtils.write(d,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";d.appendChild(k);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type",
 "text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var l=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=p&&(p.style.marginBottom="16px");a=
 new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(k.value)/100||1,b=parseInt(m.value)||0;c(!l.checked,null!=n?n.checked:!1,null!=p?p.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,f,k,l,q){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph,m="jpeg"==q?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
 d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";d.appendChild(x);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||
-"0";d.appendChild(p);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=q),t=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");k&&(d.appendChild(F),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),m+=26,mxEvent.addListener(t,"change",function(){t.checked?
+"0";d.appendChild(p);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=q),t=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");k&&(d.appendChild(F),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),m+=26,mxEvent.addListener(t,"change",function(){t.checked?
 F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(F.setAttribute("checked","checked"),F.defaultChecked=!0);var G=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(d.appendChild(E),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),m+=
 26);var J=null;if("png"==q||"jpeg"==q)J=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),m+=26;var K=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=q),H=null!=this.pages&&1<this.pages.length,L=this.addCheckbox(d,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=q);L.style.marginLeft="24px";L.style.marginBottom="16px";H?m+=26:L.style.display="none";mxEvent.addListener(K,"change",function(){K.checked&&H?L.removeAttribute("disabled"):
 L.setAttribute("disabled","disabled")});l&&H||L.setAttribute("disabled","disabled");var M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="8px";M.style.marginRight="10px";M.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));M.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));M.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));M.appendChild(a);"svg"==q&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(M),mxUtils.br(d),mxUtils.br(d),m+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=x.value;f(x.value,v.checked,!t.checked,G.checked,K.checked,E.checked,p.value,F.checked,!L.checked,M.value,null!=J?J.checked:null)}),null,c,e);this.showDialog(c.container,340,m,!0,!0,null,
+a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));M.appendChild(a);"svg"==q&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(M),mxUtils.br(d),mxUtils.br(d),m+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=x.value;f(x.value,u.checked,!t.checked,G.checked,K.checked,E.checked,p.value,F.checked,!L.checked,M.value,null!=J?J.checked:null)}),null,c,e);this.showDialog(c.container,340,m,!0,!0,null,
 null,null,null,!0);x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(k)}var m=this.addCheckbox(d,mxResources.get("fit"),
 !0),l=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible&&e,!e),n=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),x=this.addEditButton(d,p),B=x.getEditInput(),C=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(d,mxResources.get("layers"),C,!C);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(C&&D.removeAttribute("disabled"),B.removeAttribute("disabled")):
 (D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&p.checked?x.getEditSelect().removeAttribute("disabled"):x.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(m.checked,l.checked,n.checked,p.checked,x.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,f,k,l,q){function d(b){var d=" ",m="";e&&(d=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
@@ -9246,239 +9246,240 @@ EditorUi.prototype.createEmbedSvg=function(a,b,c,e,f,k,l){var d=this.editor.grap
 EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",x+="cursor:pointer;");a&&(x+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(a){l('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=x?' style="'+x+'"':"")+p+"/>")}))}else x="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
 EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),x+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),x+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=x&&d.setAttribute("style",x),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),l(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
 a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==
-a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(v){}finally{this.editor.graph=c}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,d=0;if(null!=a){if(a.hasAttribute("scale")){var c=
+a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=c}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,d=0;if(null!=a){if(a.hasAttribute("scale")){var c=
 parseFloat(a.getAttribute("scale"));!isNaN(c)&&0<c&&(b=c)}a.hasAttribute("border")&&(c=parseInt(a.getAttribute("border")),!isNaN(c)&&0<c&&(d=c))}return{scale:b,border:d}};EditorUi.prototype.getEmbeddedPng=function(a,b,c,e,f){try{var d=this.editor.graph,g=null!=d.themes&&"darkTheme"==d.defaultThemeName,k=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,
 !0),d),k=c;else if(g||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),m=d.getGlobalVariable,l=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:m.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(l.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(c){try{null==k&&(k=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=c.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
 "tEXt","mxfile",encodeURIComponent(k));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(x){null!=b&&b(x)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,d.shadowVisible,null,d,f)}catch(y){null!=b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,f,k,l,q){q=null!=q?q:!0;l=b.background;l==mxConstants.NONE&&(l=null);k=b.getSvg(l,null,null,null,null,k);b.shadowVisible&&b.addSvgShadow(k);null!=a&&
 k.setAttribute("content",a);null!=c&&k.setAttribute("resource",c);if(null!=f)this.embedFonts(k,mxUtils.bind(this,function(a){q?this.editor.convertImages(a,mxUtils.bind(this,function(a){f((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):f((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
 mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(k)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(a,d),b(a)}catch(n){b(a)}}))}catch(m){b(a)}}))};
-EditorUi.prototype.exportImage=function(a,b,c,e,f,k,l,q,u,z,y){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,q):null,u,null==this.pages||0==this.pages.length,y)}catch(B){"Invalid image"==B.message?this.downloadFile(u):
+EditorUi.prototype.exportImage=function(a,b,c,e,f,k,l,q,v,z,y){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,q):null,v,null==this.pages||0==this.pages.length,y)}catch(B){"Invalid image"==B.message?this.downloadFile(v):
 this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,k,l,z)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,c,e,f){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var k=mxUtils.parseXml(a);a={};var m=
 this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var l=m.getElementsByTagName("diagram");if(1==l.length)m=Editor.parseDiagramNode(l[0]),null!=this.currentPage&&(a[l[0].getAttribute("id")]=this.currentPage.getId());else if(1<l.length){var k=[],n=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[l[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(l[0]),e=!1,n=1);for(;n<l.length;n++){var p=l[n].getAttribute("id");
 l[n].removeAttribute("id");var x=this.updatePageRoot(new DiagramPage(l[n]));a[p]=l[n].getAttribute("id");var B=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[B+1]));g.model.execute(new ChangePage(this,x,x,B,!0));k.push(x)}this.updatePageLinks(a,k)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=g.importGraphModel(m,b,c,e),null!=d))for(n=0;n<d.length;n++)this.updatePageLinksForCell(a,d[n])}finally{g.model.endUpdate()}}}catch(C){if(f)throw C;this.handleError(C)}return d};
 EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.getLabel(b);for(var g=d.getElementsByTagName("a"),f=!1,k=0;k<g.length;k++)e=g[k].getAttribute("href"),null!=e&&(g[k].setAttribute("href",this.updatePageLink(a,e)),
 f=!0);f&&c.labelChanged(b,d.innerHTML)}for(k=0;k<c.model.getChildCount(b);k++)this.updatePageLinksForCell(a,c.model.getChildAt(b,k))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var d=a[b.substring(b.indexOf(",")+1)];b=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));if(null!=c.actions){for(var e=0;e<c.actions.length;e++){var g=c.actions[e];null!=g.open&&"data:page/id,"==g.open.substring(0,
 13)&&(d=a[g.open.substring(g.open.indexOf(",")+1)],null!=d?g.open="data:page/id,"+d:delete g.open)}b="data:action/json,"+JSON.stringify(c)}}catch(t){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(e);
-try{var g="UNKNOWN-VISIO",f=e.lastIndexOf(".");0<=f&&f<e.length&&(g=e.substring(f+1).toUpperCase());EditorUi.logEvent({category:g+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(z){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",a,e);var k=new XMLHttpRequest;k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);
-k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(x){c({message:mxResources.get("errorLoadingFile")})}});d.readAsText(a)}else this.doImportVisio(a,b,c,e)}catch(A){c(A)}else c({})});k.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(z){c(z)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(p){c(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
-this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||
-this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(p){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){null!=window.console&&console.error(p),c(p)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,e){var d=this,g=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+
-(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var g=parseFloat(b[0].getAttribute("width")),f=parseFloat(b[0].getAttribute("height"));c(d.convertDataUri(Editor.createSvgDataUri(a)),g,f)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(t){e(t)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?g():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=g(c1&63);r+=g(c2&63);r+=g(c3&63);return r+=g(c4&63)}function g(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+
-a);a-=26;return 0==a?"-":1==a?"_":"?"}var f=new XMLHttpRequest;f.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+d(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+d(a.charCodeAt(i),0,0):r+d(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(f.responseType="blob");f.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);
-else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,g=b.height;if(0==a&&0==g){var f=d.result,k=f.indexOf(","),m=decodeURIComponent(escape(atob(f.substring(k+1)))),l=mxUtils.parseXml(m).getElementsByTagName("svg");0<l.length&&(a=parseFloat(l[0].getAttribute("width")),g=parseFloat(l[0].getAttribute("height")))}c(d.result,a,g)}catch(G){e(G)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};f.onerror=function(a){e(a)};
-f.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,e,f,k,l){k=null!=k?k:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var g=Editor.extractGraphModelFromPdf(a);if(null!=g&&0<g.length)return this.importXml(g,b,c,k,!0)}if("data:image/png;base64,"==
-a.substring(0,22)&&(g=this.extractGraphModelFromPng(a),null!=g&&0<g.length))return this.importXml(g,b,c,k,!0);if("data:image/svg+xml;"==a.substring(0,19))try{g=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+1));var m=this.importXml(g,b,c,k,!0);if(0<m.length)return m}catch(A){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,
-a,mxUtils.bind(this,function(a,e,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),f=Math.round(e.width*g);e=Math.round(e.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";"))}}),mxUtils.bind(this,function(){var g=null;d.getModel().beginUpdate();try{g=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(g),d.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{d.getModel().endUpdate()}d.setSelectionCell(g)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,
-function(d){this.editor.graph.setSelectionCells(this.importXml(d,b,c,k));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));
-else{d=this.editor.graph;f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[f]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");f.value=a;d.updateCellSize(f);if(0<this.maxTextWidth&&f.geometry.width>this.maxTextWidth){var n=d.getPreferredSizeForCell(f,
-this.maxTextWidth);f.geometry.width=n.width;f.geometry.height=n.height}Graph.isLink(f.value)&&d.setLinkForCell(f,f.value);f.geometry.width+=d.gridSize;f.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=
-a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type",
-"file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;g.apply(e,
-arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var g=0,f,k=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&
-(e=parseInt(e.substr(9)),e>g&&(g=e,f=d))});0<g?f.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
-e))};EditorUi.prototype.importFile=function(a,b,c,e,f,k,l,q,u,z,y){z=null!=z?z:!0;var d=!1,g=null,m=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,c,e,z);null!=q&&q(b)});"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=y?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,c,e,z),u=!0)),u||(b=this.editor.graph,y=a.indexOf(";"),0<y&&(a=a.substring(0,y)+a.substring(a.indexOf(",",
-y+1))),z&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),g=[b.insertVertex(null,null,"",c,e,f,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,m)):null!=u&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(d=!0,this.importVisio(u,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=
-u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?m(a.responseText):null!=q&&q(null))}),l)):0==a.indexOf("PK")&&null!=u?(d=!0,this.importZipFile(u,m,mxUtils.bind(this,function(){g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,z);q(g)}))):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,z));d||null==q||q(g);return g};EditorUi.prototype.importFiles=
-function(a,b,c,e,f,k,l,q,u,z,y,A){e=null!=e?e:this.maxImageSize;z=null!=z?z:this.maxImageBytes;var d=null!=b&&null!=c,g=!0;b=null!=b?b:0;c=null!=c?c:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=y||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){m=!0;break}var v=mxUtils.bind(this,function(){var m=this.editor.graph,n=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,e,g,f,k,m,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),
-this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,g,f,k,m,l,d,A)}catch(aa){return this.handleError(aa),null}});k=null!=k?k:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var x=a.length,p=x,u=[],B=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--p){this.spinner.stop();if(null!=q)q(u);else{var d=[];m.getModel().beginUpdate();try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),
-v=0;v<x;v++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var x=new FileReader;x.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var x=a.target.result,p=x.indexOf(","),u=decodeURIComponent(escape(atob(x.substring(p+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],t=A?null:u.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,
-!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(x.substring(0,p+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=g.getAttribute("width"),u=g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox",
-"0 0 "+l+" "+u);else if(isNaN(l)||isNaN(u)){var t=B.split(" ");3<t.length&&(l=parseFloat(t[2]),u=parseFloat(t[3]))}x=Editor.createSvgDataUri(mxUtils.getXml(g));var q=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,u)),C=f(x,k.type,b+d*n,c+d*n,Math.max(1,Math.round(l*q)),Math.max(1,Math.round(u*q)),k.name);if(isNaN(l)||isNaN(u)){var D=new Image;D.onload=mxUtils.bind(this,function(){l=Math.max(1,D.width);u=Math.max(1,D.height);C[0].geometry.width=l;C[0].geometry.height=u;g.setAttribute("viewBox",
-"0 0 "+l+" "+u);x=Editor.createSvgDataUri(mxUtils.getXml(g));var a=x.indexOf(";");0<a&&(x=x.substring(0,a)+x.substring(x.indexOf(",",a+1)));m.setCellStyles("image",x,[C[0]])});D.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return C}}}catch(fa){}return null})):B(d,mxUtils.bind(this,function(){return f(t,"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var q=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=q&&
-0<q.length){var C=new Image;C.src=a.target.result;B(d,mxUtils.bind(this,function(){return f(q,"text/xml",b+d*n,c+d*n,C.width,C.height,k.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,
-a.target.result,mxUtils.bind(this,function(m,l,x){B(d,mxUtils.bind(this,function(){if(null!=m&&m.length<z){var p=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(e/l,e/x)):1;return f(m,k.type,b+d*n,c+d*n,Math.round(l*p),Math.round(x*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,e,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else x=a.target.result,f(x,k.type,b+d*n,c+d*n,240,160,k.name,
-function(a){B(d,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?f(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?x.readAsDataURL(k):x.readAsText(k)}})(v)});if(m){m=[];for(p=0;p<a.length;p++)m.push(a[p]);a=m;this.confirmImageResize(function(a){g=a;v()},u)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&
-null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+
-Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(v){}};EditorUi.prototype.isResampleImage=function(a,
-b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,f,k){f=null!=f?f:this.maxImageSize;var d=Math.max(1,a.width),g=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var m=Math.max(d/f,g/f);if(1<m){var l=Math.round(d/m),n=Math.round(g/m),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var x=p.toDataURL();if(x.length<b.length){var B=document.createElement("canvas");B.width=l;B.height=n;var v=
-B.toDataURL();x!==v&&(b=x,d=l,g=n)}}}catch(D){}c(b,d,g)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(p){if(null!=c)c(p);else throw p;}};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
-!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;c.cellEditor.editPlantUmlData=function(b,d,e){var g=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("plantUml")+":",g.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,g.format,function(e,f,k){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(b,"<pre>"+e+"</pre>"),
-c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(e),[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=f,m.height=k,c.cellsResized([b],[m],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:d,format:g.format}))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};c.cellEditor.editMermaidData=function(b,d,e){var g=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+
-":",g.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,g.config,function(e,f,k){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",e,[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=Math.max(m.width,f),m.height=Math.max(m.height,k),c.cellsResized([b],[m],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:d,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},
-null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,d){try{var c=this.graph.getAttributeForCell(b,"plantUmlData");null!=c?this.editPlantUmlData(b,d,c):(c=this.graph.getAttributeForCell(b,"mermaidData"),null!=c?this.editMermaidData(b,d,c):e.apply(this,arguments))}catch(D){a.handleError(D)}};c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(C){a.handleError(C)}return d};
-var f=this.clearDefaultStyle;this.clearDefaultStyle=function(){f.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var k=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&
-(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return k.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,d){var e=b;b=function(a,b){if(null==b){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(b=d.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&mxEvent.consume(a);null!=e&&e(a,b)};l.call(this,a,b,d)};b.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
-null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var t=c.getExportVariables;c.getExportVariables=function(){var b=t.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,
-a.currentPage)+1:1;return b};var q=c.getGlobalVariable;c.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};var u=c.labelLinkClicked;c.labelLinkClicked=function(a,b,d){var e=b.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&
-mxEvent.isPopupTrigger(d))u.apply(this,arguments);else{if(!c.isEnabled()||null!=a&&c.isCellLocked(a.cell))c.customLinkClicked(e),c.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
-!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/
-2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&
-(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=
-a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(z=this.editor.graph.view,z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,z.unit),this.refresh());if("1"==urlParams.styledev){z=document.getElementById("geFooter");null!=z&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",
-mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));
-var y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:y.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,
-function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,g=b.x/e-d.x,f=b.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&
-(f=g=null),this.importFiles(a.dataTransfer.files,g,f,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(f=g=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,g,f,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),
-b=document.createElement("div");b.innerHTML=m;var l=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(l=!0)):(d=b.getElementsByTagName("a"),null!=d&&1==d.length?m=d[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(m=mxUtils.getTextContent(b[0]))));var n=!0,x=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,f,!0,l,null,n))});l&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){n=
-a;x()},mxEvent.isControlDown(a)):x()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,
-g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var d=b.clipboardData||
-b.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var g=d.items;for(index in g){var f=g[index];if("file"===f.kind){if(a.isEditing())this.importFiles([f.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,g,f){a.insertImage(b,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],k.x,k.y,this.maxImageSize);
-mxEvent.consume(b)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML="&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak=
-"break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);
-mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",
-!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),
-a()}catch(t){this.handleError(t)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c,!0),a()}catch(t){this.handleError(t)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,
-!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=
-function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();
-if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("customFonts");this.menus.customFonts=
-d;mxSettings.setCustomFonts(d);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);
-mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&
-this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),
-e=mxUtils.getXml(d.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,e){if(!mxEvent.isConsumed(a)){var d=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){d=document.createElement("div");d.innerHTML=g;f=!0;g=d.getElementsByTagName("style");
-if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(g=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,g==d.firstChild.nextSibling.getAttribute("href")&&
-(mxUtils.setTextContent(d,g),f=!1));Graph.removePasteFormatting(d)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,g))}g=d.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))c=g[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:
-(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,d));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),k=!1;try{var l=f.lastIndexOf("%3E");0<=l&&l<f.length-3&&(f=f.substring(0,l+3))}catch(B){}try{var g=d.getElementsByTagName("span"),m=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):
-decodeURIComponent(f);this.isCompatibleString(m)&&(k=!0,f=m)}catch(B){}try{var n=this.editor.graph;if(null!=f&&0<f.length){n.lastPasteXml==f?n.pasteCounter++:(n.lastPasteXml=f,n.pasteCounter=0);var A=n.pasteCounter*n.gridSize;if(k||this.isCompatibleString(f))n.setSelectionCells(this.importXml(f,A,A));else if(e&&1==n.getSelectionCount())n.labelChanged(n.getSelectionCell(),f),Graph.isLink(f)&&n.setLinkForCell(n.getSelectionCell(),f);else{var x=n.getInsertPoint();n.isMouseInsertPoint()&&(A=0,n.lastPasteXml==
-f&&0<n.pasteCounter&&n.pasteCounter--);n.setSelectionCells(this.insertTextAt(f,x.x+A,x.y+A,!0))}n.isSelectionEmpty()||(n.scrollCellToVisible(n.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));try{mxEvent.consume(a)}catch(B){}}else c||(n.lastPasteXml=null,n.pasteCounter=0)}catch(B){this.handleError(B)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],
-"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||
-"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,
-"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?
-(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};
-EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var f=document.documentElement;c=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=d+"px";f.style.width=
-Math.max(0,c-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=
-function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{var c=d.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":
-e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,
-mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,
-e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==d.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,d.target.result,a.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else if(0==
-c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(y){this.handleError(y)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
-window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=
-function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=
-function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
-a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
-this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();
-window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
-pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=Graph.decompress(a)))}catch(Z){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(X){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?
-mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),
-mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(X){k.postMessage(JSON.stringify({event:"draft",
-error:X.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var x=1==g.enableRecent,p=1==g.enableSearch,v=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,x?mxUtils.bind(this,
-function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,p?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,v?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,
-!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var t=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:t,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var q=
-null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,q):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var G=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=this.editor.graph,J=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();
-var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(G);k.postMessage(JSON.stringify(b),"*")}),K=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(G)));E!=this.editor.graph&&E.container.parentNode.removeChild(E.container);J(a)}),H=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
-H){for(var L=E.getGlobalVariable,E=this.createTemporaryGraph(E.getStylesheet()),M,I=0;I<this.pages.length;I++)if(this.pages[I].getId()==H){M=this.updatePageRoot(this.pages[I]);break}E.getGlobalVariable=function(a){return"page"==a?M.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(E.container);E.model.setRoot(M.root)}if(null!=g.layerIds){for(var U=E.model,T=U.getChildCells(U.getRoot()),m={},I=0;I<g.layerIds.length;I++)m[g.layerIds[I]]=!0;for(I=0;I<T.length;I++)U.setVisible(T[I],
-m[T[I].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){K(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){K(null)}),null,null,g.scale,null,null,null,E)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=H?"&pageId="+H:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(G))).send(mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()?J("data:image/png;base64,"+a.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);q=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ca=this.getXmlFileData();q.xml=mxUtils.getXml(ca);q.data=this.getFileData(null,null,!0,null,null,null,ca);q.format=g.format}else if("html"==g.format)G=this.editor.getGraphXml(),
-q.data=this.getHtml(G,this.editor.graph),q.xml=mxUtils.getXml(G),q.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ba=this.editor.graph.background;ba==mxConstants.NONE&&(ba=null);q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);q.format="svg";var W=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(q),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,
-null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,W,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var S=this.editor.graph.getSvg(ba);this.embedFonts(S,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){W(mxUtils.getXml(a))})):W(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(q),
-"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight=
-"38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",
-data:JSON.stringify(g)}),"*");return}}catch(X){this.handleError(X)}}var V=mxUtils.bind(this,function(g,f){d=!0;try{a(g,f)}catch(P){this.handleError(P)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=l();if(c!=e&&!d){var g=this.createLoadMessage("autosave");g.xml=c;c=
-JSON.stringify(g);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",
-b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){V(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),
-l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&V(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){V(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):
-(g=l(g),V(g,f))}}));var k=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?
-(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
-mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight=
-"20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),
-this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-
-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,z=null,y=null,A=null,x=null,B=null,C=null,D="",F="auto",G="auto",E=null,J=null,K=40,H=40,L=100,M=0,I=this.editor.graph;I.getGraphBounds();for(var U=function(){null!=b?b(ja):(I.setSelectionCells(ja),I.scrollCellToVisible(I.getSelectionCell()))},T=I.getFreeInsertPoint(),ca=T.x,ba=T.y,T=ba,W=null,S="auto",C=null,V=[],X=null,Z=null,aa=0;aa<c.length&&"#"==c[aa].charAt(0);){a=c[aa];
-for(aa++;aa<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[aa].substring(1)),aa++;if("#"!=a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),N=mxUtils.trim(a.substring(P+1));"label"==Q?W=I.sanitizeHtml(N):"labelname"==Q&&0<N.length&&"-"!=N?y=N:"labels"==Q&&0<N.length&&"-"!=N?A=JSON.parse(N):"style"==Q?k=N:"parentstyle"==Q?x=N:"stylename"==Q&&0<N.length&&"-"!=N?z=N:"styles"==Q&&0<N.length&&"-"!=N?l=JSON.parse(N):"identity"==
-Q&&0<N.length&&"-"!=N?B=N:"parent"==Q&&0<N.length&&"-"!=N?C=N:"namespace"==Q&&0<N.length&&"-"!=N?D=N:"width"==Q?F=N:"height"==Q?G=N:"left"==Q&&0<N.length?E=N:"top"==Q&&0<N.length?J=N:"ignore"==Q?Z=N.split(","):"connect"==Q?V.push(JSON.parse(N)):"link"==Q?X=N:"padding"==Q?M=parseFloat(N):"edgespacing"==Q?K=parseFloat(N):"nodespacing"==Q?H=parseFloat(N):"levelspacing"==Q?L=parseFloat(N):"layout"==Q&&(S=N)}}}if(null==c[aa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(c[aa]),
-Q=P=null,N=[],R=0;R<ga.length;R++)B==ga[R]&&(P=R),C==ga[R]&&(Q=R),N.push(mxUtils.trim(ga[R]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==W&&(W="%"+N[0]+"%");if(null!=V)for(var Y=0;Y<V.length;Y++)null==g[V[Y].to]&&(g[V[Y].to]={});B=[];for(R=aa+1;R<c.length;R++){var da=this.editor.csvToArray(c[R]);if(null==da){var ta=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(ta+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&B.push(da)}I.model.beginUpdate();
-try{for(R=0;R<B.length;R++){var da=B[R],O=null,ha=null!=P?D+da[P]:null;null!=ha&&(O=I.model.getCell(ha));var c=null!=O,fa=new mxCell(W,new mxGeometry(ca,T,0,0),k||"whiteSpace=wrap;html=1;");fa.vertex=!0;fa.id=ha;for(var ea=0;ea<da.length;ea++)I.setAttributeForCell(fa,N[ea],da[ea]);if(null!=y&&null!=A){var ka=A[fa.getAttribute(y)];null!=ka&&I.labelChanged(fa,ka)}if(null!=z&&null!=l){var pa=l[fa.getAttribute(z)];null!=pa&&(fa.style=pa)}I.setAttributeForCell(fa,"placeholders","1");fa.style=I.replacePlaceholders(fa,
-fa.style);c&&(I.model.setGeometry(O,fa.geometry),I.model.setStyle(O,fa.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=fa;if(!c)for(Y=0;Y<V.length;Y++)g[V[Y].to][O.getAttribute(V[Y].to)]=O;null!=X&&"link"!=X&&(I.setLinkForCell(O,O.getAttribute(X)),I.setAttributeForCell(O,X,null));I.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var ia=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=E&&null!=O.getAttribute(E)&&(O.geometry.x=ca+parseFloat(O.getAttribute(E))),null!=J&&null!=O.getAttribute(J)&&
-(O.geometry.y=ba+parseFloat(O.getAttribute(J))),"@"==F.charAt(0)&&null!=O.getAttribute(F.substring(1))?O.geometry.width=parseFloat(O.getAttribute(F.substring(1))):O.geometry.width="auto"==F?ia.width+M:parseFloat(F),"@"==G.charAt(0)&&null!=O.getAttribute(G.substring(1))?O.geometry.height=parseFloat(O.getAttribute(G.substring(1))):O.geometry.height="auto"==G?ia.height+M:parseFloat(G),T+=O.geometry.height+H);c?(null==f[ha]&&(f[ha]=[]),f[ha].push(O)):(C=null!=Q?I.model.getCell(D+da[Q]):null,d.push(O),
-null!=C?(C.style=I.replacePlaceholders(C,x),I.addCell(O,C)):e.push(I.addCell(O)))}for(var la=e.slice(),ja=e.slice(),Y=0;Y<V.length;Y++)for(var wa=V[Y],R=0;R<d.length;R++){var O=d[R],qa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(I.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||
-""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?I.replacePlaceholders(l,c.style):I.createCurrentEdgeStyle();ja.push(I.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,l));mxUtils.remove(c.invert?a:f,la)}}});qa(O,O,wa);if(null!=f[O.id])for(ea=0;ea<f[O.id].length;ea++)qa(O,f[O.id][ea],wa)}if(null!=Z)for(R=0;R<d.length;R++)for(O=d[R],ea=0;ea<Z.length;ea++)I.setAttributeForCell(O,mxUtils.trim(Z[ea]),null);if(0<e.length){var ma=new mxParallelEdgeLayout(I);ma.spacing=K;var ua=function(){0<
-ma.spacing&&ma.execute(I.getDefaultParent());for(var a=0;a<e.length;a++){var b=I.getCellGeometry(e[a]);b.x=Math.round(I.snap(b.x));b.y=Math.round(I.snap(b.y));"auto"==F&&(b.width=Math.round(I.snap(b.width)));"auto"==G&&(b.height=Math.round(I.snap(b.height)))}};if("["==S.charAt(0)){var va=U;I.view.validate();this.executeLayoutList(JSON.parse(S),function(){ua();va()});U=null}else if("circle"==S){var ra=new mxCircleLayout(I);ra.resetEdges=!1;var xa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return xa.apply(this,
-arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(I.getDefaultParent());ua()},!0,U);U=null}else if("horizontaltree"==S||"verticaltree"==S||"auto"==S&&ja.length==2*e.length-1&&1==la.length){I.view.validate();var sa=new mxCompactTreeLayout(I,"horizontaltree"==S);sa.levelDistance=H;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(I.getDefaultParent(),0<la.length?la[0]:null)},!0,U);U=null}else if("horizontalflow"==S||"verticalflow"==S||"auto"==S&&
-1==la.length){I.view.validate();var na=new mxHierarchicalLayout(I,"horizontalflow"==S?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);na.intraCellSpacing=H;na.parallelEdgeSpacing=K;na.interRankCellSpacing=L;na.disableEdgeStyle=!1;this.executeLayout(function(){na.execute(I.getDefaultParent(),ja);I.moveCells(ja,ca,ba)},!0,U);U=null}else if("organic"==S||"auto"==S&&ja.length>e.length){I.view.validate();var oa=new mxFastOrganicLayout(I);oa.forceConstant=3*H;oa.resetEdges=!1;var ya=oa.isVertexIgnored;
-oa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ma=new mxParallelEdgeLayout(I);ma.spacing=K;this.executeLayout(function(){oa.execute(I.getDefaultParent());ua()},!0,U);U=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=U&&U()}}catch(za){this.handleError(za)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&
-null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=
-function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-
-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&
-null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*
-(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;
-null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||
-null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);
-this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);
-this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
-function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){f.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();
-this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());
-this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&
-null!=a&&null!=a.shape&&null!=a.shape.stencil)};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);l.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,f,k,l){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");
-else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,f,k)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),m=d.getGraphBounds(),n=Math.floor(m.width*f/d.view.scale),p=Math.floor(m.height*f/d.view.scale);if(g.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var x={globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+
-(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(x))+(0<l?"&dpi="+l:"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(g))})}else"png"==c?a.exportImage(f,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,l):a.exportImage(f,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=
-this.pages)for(var c=0;c<this.pages.length;c++){var e=a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),e.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,
-mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var l=k[a];if("R"==l.substring(0,1)){var u=JSON.parse(decodeURIComponent(l.substring(1)));f[u[0]]={id:u[0],
-title:u[1],downloadUrl:u[2]}}}}catch(z){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,function(a){e.innerHTML=
-"";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,
-function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,
-null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,e,f){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);d&&e.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:f});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",
-msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),
-k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(z){c(null,"Invalid Call: An error occured, "+z.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});
-2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(t){null!=b&&b(t)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||
-"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=
-e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(G){console.log(G)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(G){console.log(G)}});
-a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(E){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(E){console.log(E)}});
-window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,f){this.openDatabase(mxUtils.bind(this,function(d){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=d.transaction(f,"readwrite");g.oncomplete=c;g.onerror=e;for(d=0;d<f.length;d++)g.objectStore(f[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(q){null!=
-e&&e(q)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};
-f.onerror=c}catch(t){null!=c&&c(t)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,
-function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=
-a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=
-function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();
-return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,c,e,f,k,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,c,e,f,k,l,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
-return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,
-b,c,e,f,k,l,q,u,z,y,A,x,B,C){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,c,e,f,k,l,q,u,z,y,A,x,B,C)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,c,e)};EditorUi.prototype.convertImageToDataUri=
-function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,c,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};
-EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,c,e,f)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var f="<mxfile "===
-e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(f||e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,e,c,b,k,f){function l(){for(var a=A.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==A&&b++;x.style.display=0==b?"block":"none"}function d(a,b,c,d){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}u={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
-"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),l()):e();u=null});n.className="geCommentEditBtn";m.appendChild(n);var x=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);u=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
+try{var g="UNKNOWN-VISIO",f=e.lastIndexOf(".");if(0<=f&&f<e.length)g=e.substring(f+1).toUpperCase();else{var k=e.lastIndexOf("/");0<=k&&k<e.length&&(e=e.substring(k+1))}EditorUi.logEvent({category:g+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(y){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",a,e);var m=new XMLHttpRequest;
+m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(B){c({message:mxResources.get("errorLoadingFile")})}});d.readAsText(a)}else this.doImportVisio(a,b,c,e)}catch(x){c(x)}else c({})});m.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(y){c(y)}}else this.spinner.stop(),
+this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(p){c(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
+this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
+"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(p){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){null!=window.console&&
+console.error(p),c(p)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,e){var d=this,g=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=
+!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var g=parseFloat(b[0].getAttribute("width")),f=parseFloat(b[0].getAttribute("height"));c(d.convertDataUri(Editor.createSvgDataUri(a)),g,
+f)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(t){e(t)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?g():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=g(c1&63);r+=g(c2&63);r+=g(c3&63);return r+=g(c4&63)}function g(a){if(10>a)return String.fromCharCode(48+
+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var f=new XMLHttpRequest;f.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+d(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+d(a.charCodeAt(i),0,0):r+d(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(f.responseType=
+"blob");f.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,g=b.height;if(0==a&&0==g){var f=d.result,k=f.indexOf(","),m=decodeURIComponent(escape(atob(f.substring(k+1)))),l=mxUtils.parseXml(m).getElementsByTagName("svg");0<l.length&&(a=parseFloat(l[0].getAttribute("width")),g=parseFloat(l[0].getAttribute("height")))}c(d.result,a,
+g)}catch(G){e(G)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};f.onerror=function(a){e(a)};f.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,e,f,k,l){k=null!=k?k:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&
+!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var g=
+Editor.extractGraphModelFromPdf(a);if(null!=g&&0<g.length)return this.importXml(g,b,c,k,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(g=this.extractGraphModelFromPng(a),null!=g&&0<g.length))return this.importXml(g,b,c,k,!0);if("data:image/svg+xml;"==a.substring(0,19))try{g=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+1));var m=this.importXml(g,
+b,c,k,!0);if(0<m.length)return m}catch(A){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
+f=Math.round(e.width*g);e=Math.round(e.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var g=null;d.getModel().beginUpdate();try{g=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(g),d.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{d.getModel().endUpdate()}d.setSelectionCell(g)}))}else{a=
+Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(d){this.editor.graph.setSelectionCells(this.importXml(d,b,c,k));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
+mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[f]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
+a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");f.value=a;d.updateCellSize(f);if(0<this.maxTextWidth&&f.geometry.width>this.maxTextWidth){var n=d.getPreferredSizeForCell(f,this.maxTextWidth);f.geometry.width=n.width;f.geometry.height=n.height}Graph.isLink(f.value)&&d.setLinkForCell(f,f.value);f.geometry.width+=d.gridSize;f.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<
+a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
+14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
+if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
+360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;g.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var g=0,f,k=!1;e.forEach(function(a,
+d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,f=d))});0<g?f.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},
+function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,f,k,l,q,v,z,y){z=null!=z?z:!0;var d=!1,g=null,m=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,c,e,z);null!=q&&q(b)});"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=y?null:
+this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,c,e,z),v=!0)),v||(b=this.editor.graph,y=a.indexOf(";"),0<y&&(a=a.substring(0,y)+a.substring(a.indexOf(",",y+1))),z&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),g=[b.insertVertex(null,null,"",c,e,f,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,m)):null!=v&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||
+/(\.vs(x|sx?))($|\?)/i.test(l))?(d=!0,this.importVisio(v,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=v?v:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?m(a.responseText):null!=q&&q(null))}),l)):0==a.indexOf("PK")&&null!=v?(d=!0,this.importZipFile(v,m,mxUtils.bind(this,function(){g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,z);q(g)}))):/(\.v(sd|dx))($|\?)/i.test(l)||
+/(\.vs(s|x))($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,z));d||null==q||q(g);return g};EditorUi.prototype.importFiles=function(a,b,c,e,f,k,l,q,v,z,y,A){e=null!=e?e:this.maxImageSize;z=null!=z?z:this.maxImageBytes;var d=null!=b&&null!=c,g=!0;b=null!=b?b:0;c=null!=c?c:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=y||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){m=!0;break}var u=mxUtils.bind(this,function(){var m=
+this.editor.graph,n=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,e,g,f,k,m,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,g,f,k,m,l,d,A)}catch(aa){return this.handleError(aa),null}});k=null!=k?k:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var x=a.length,p=x,v=[],B=mxUtils.bind(this,function(a,b){v[a]=b;if(0==
+--p){this.spinner.stop();if(null!=q)q(v);else{var d=[];m.getModel().beginUpdate();try{for(var c=0;c<v.length;c++){var e=v[c]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),u=0;u<x;u++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var x=new FileReader;x.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var x=a.target.result,p=x.indexOf(","),v=decodeURIComponent(escape(atob(x.substring(p+1)))),
+u=mxUtils.parseXml(v),v=u.getElementsByTagName("svg");if(0<v.length){var v=v[0],t=A?null:v.getAttribute("content");null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(x.substring(0,p+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=g.getAttribute("width"),v=
+g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,v=null!=v&&"%"!=v.charAt(v.length-1)?parseFloat(v):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox","0 0 "+l+" "+v);else if(isNaN(l)||isNaN(v)){var t=B.split(" ");3<t.length&&(l=parseFloat(t[2]),v=parseFloat(t[3]))}x=Editor.createSvgDataUri(mxUtils.getXml(g));var q=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,v)),C=f(x,k.type,b+d*n,c+d*n,Math.max(1,Math.round(l*q)),Math.max(1,Math.round(v*
+q)),k.name);if(isNaN(l)||isNaN(v)){var D=new Image;D.onload=mxUtils.bind(this,function(){l=Math.max(1,D.width);v=Math.max(1,D.height);C[0].geometry.width=l;C[0].geometry.height=v;g.setAttribute("viewBox","0 0 "+l+" "+v);x=Editor.createSvgDataUri(mxUtils.getXml(g));var a=x.indexOf(";");0<a&&(x=x.substring(0,a)+x.substring(x.indexOf(",",a+1)));m.setCellStyles("image",x,[C[0]])});D.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return C}}}catch(fa){}return null})):B(d,mxUtils.bind(this,function(){return f(t,
+"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{v=!1;if("image/png"==k.type){var q=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=q&&0<q.length){var C=new Image;C.src=a.target.result;B(d,mxUtils.bind(this,function(){return f(q,"text/xml",b+d*n,c+d*n,C.width,C.height,k.name)}));v=!0}}v||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,l,x){B(d,mxUtils.bind(this,function(){if(null!=m&&m.length<z){var p=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(e/l,e/x)):1;return f(m,k.type,b+d*n,c+d*n,Math.round(l*p),Math.round(x*p),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),g,e,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else x=a.target.result,f(x,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?f(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?x.readAsDataURL(k):x.readAsText(k)}})(u)});if(m){m=[];
+for(p=0;p<a.length;p++)m.push(a[p]);a=m;this.confirmImageResize(function(a){g=a;u()},v)}else u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",
+OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(u){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,f,k){f=null!=f?f:this.maxImageSize;var d=Math.max(1,a.width),g=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var m=Math.max(d/f,g/f);if(1<m){var l=Math.round(d/m),n=Math.round(g/m),p=document.createElement("canvas");
+p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var x=p.toDataURL();if(x.length<b.length){var B=document.createElement("canvas");B.width=l;B.height=n;var u=B.toDataURL();x!==u&&(b=x,d=l,g=n)}}}catch(D){}c(b,d,g)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);
+d.src=a}catch(p){if(null!=c)c(p);else throw p;}};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;c.cellEditor.editPlantUmlData=function(b,d,e){var g=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("plantUml")+":",g.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&
+a.generatePlantUmlImage(d,g.format,function(e,f,k){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(b,"<pre>"+e+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(e),[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=f,m.height=k,c.cellsResized([b],[m],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:d,format:g.format}))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,
+420,300,!0,!0);d.init()};c.cellEditor.editMermaidData=function(b,d,e){var g=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",g.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,g.config,function(e,f,k){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",e,[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=Math.max(m.width,f),m.height=Math.max(m.height,k),c.cellsResized([b],[m],!1));c.setAttributeForCell(b,
+"mermaidData",JSON.stringify({data:d,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,d){try{var c=this.graph.getAttributeForCell(b,"plantUmlData");null!=c?this.editPlantUmlData(b,d,c):(c=this.graph.getAttributeForCell(b,"mermaidData"),null!=c?this.editMermaidData(b,d,c):e.apply(this,arguments))}catch(D){a.handleError(D)}};
+c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(C){a.handleError(C)}return d};var f=this.clearDefaultStyle;this.clearDefaultStyle=function(){f.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var k=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=
+a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return k.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,d){var e=b;b=function(a,b){if(null==b){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(b=d.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&
+mxEvent.consume(a);null!=e&&e(a,b)};l.call(this,a,b,d)};b.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var t=c.getExportVariables;c.getExportVariables=function(){var b=t.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle());
+b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var q=c.getGlobalVariable;c.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?
+a.pages.length:1:q.apply(this,arguments)};var v=c.labelLinkClicked;c.labelLinkClicked=function(a,b,d){var e=b.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))v.apply(this,arguments);else{if(!c.isEnabled()||null!=a&&c.isCellLocked(a.cell))c.customLinkClicked(e),c.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b};
+var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",
+!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",
+function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,
+g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,
+a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(z=this.editor.graph.view,
+z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,z.unit),this.refresh());if("1"==urlParams.styledev){z=document.getElementById("geFooter");null!=z&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type",
+"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:y.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var A=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,
+function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,g=b.x/e-d.x,f=b.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(f=g=null),this.importFiles(a.dataTransfer.files,g,f,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(f=g=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,g,f,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=m;var l=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(l=!0)):(d=b.getElementsByTagName("a"),null!=
+d&&1==d.length?m=d[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(m=mxUtils.getTextContent(b[0]))));var n=!0,x=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,f,!0,l,null,n))});l&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;x()},mxEvent.isControlDown(a)):x()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,
+a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();
+a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var d=b.clipboardData||b.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var g=d.items;for(index in g){var f=g[index];
+if("file"===f.kind){if(a.isEditing())this.importFiles([f.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,g,f){a.insertImage(b,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(v){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
+"&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow=
+"hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
+b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(t){this.handleError(t)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(c,!0),a()}catch(t){this.handleError(t)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};
+EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));
+this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
+function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=
+null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,e){if(!mxEvent.isConsumed(a)){var d=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){d=document.createElement("div");d.innerHTML=g;f=!0;g=d.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&
+null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(g=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,g==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,g),f=!1));Graph.removePasteFormatting(d)}else g=a.clipboardData.getData("text/plain"),
+null!=g&&0<g.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,g))}g=d.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))c=g[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,
+d));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),k=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(B){}try{var g=d.getElementsByTagName("span"),l=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(l)&&(k=!0,f=l)}catch(B){}try{var n=
+this.editor.graph;if(null!=f&&0<f.length){n.lastPasteXml==f?n.pasteCounter++:(n.lastPasteXml=f,n.pasteCounter=0);var A=n.pasteCounter*n.gridSize;if(k||this.isCompatibleString(f))n.setSelectionCells(this.importXml(f,A,A));else if(e&&1==n.getSelectionCount())n.labelChanged(n.getSelectionCell(),f),Graph.isLink(f)&&n.setLinkForCell(n.getSelectionCell(),f);else{var x=n.getInsertPoint();n.isMouseInsertPoint()&&(A=0,n.lastPasteXml==f&&0<n.pasteCounter&&n.pasteCounter--);n.setSelectionCells(this.insertTextAt(f,
+x.x+A,x.y+A,!0))}n.isSelectionEmpty()||(n.scrollCellToVisible(n.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));try{mxEvent.consume(a)}catch(B){}}else c||(n.lastPasteXml=null,n.pasteCounter=0)}catch(B){this.handleError(B)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);
+a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),
+"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,
+"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,
+function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;
+var f=document.documentElement;c=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=d+"px";f.style.width=Math.max(0,c-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?
+this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=
+0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{var c=d.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&
+this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,
+e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==d.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,d.target.result,a.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();
+f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(y){this.handleError(y)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===
+a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):
+e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));
+null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=
+a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&
+this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);
+null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<
+this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,
+page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=
+f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(Z){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(X){g=null}try{if(null==
+g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},
+null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),
+g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(X){k.postMessage(JSON.stringify({event:"draft",error:X.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var x=
+1==g.enableRecent,p=1==g.enableSearch,u=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,x?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):
+null,p?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==
+g.action){var t=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:t,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var q=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,
+q):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var G=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=this.editor.graph,J=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(G);
+k.postMessage(JSON.stringify(b),"*")}),K=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(G)));E!=this.editor.graph&&E.container.parentNode.removeChild(E.container);J(a)}),H=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=H){for(var L=E.getGlobalVariable,E=this.createTemporaryGraph(E.getStylesheet()),M,I=0;I<this.pages.length;I++)if(this.pages[I].getId()==
+H){M=this.updatePageRoot(this.pages[I]);break}E.getGlobalVariable=function(a){return"page"==a?M.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(E.container);E.model.setRoot(M.root)}if(null!=g.layerIds){for(var U=E.model,T=U.getChildCells(U.getRoot()),m={},I=0;I<g.layerIds.length;I++)m[g.layerIds[I]]=!0;for(I=0;I<T.length;I++)U.setVisible(T[I],m[T[I].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){K(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
+function(){K(null)}),null,null,g.scale,null,null,null,E)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=H?"&pageId="+H:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(G))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?J("data:image/png;base64,"+a.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!=
+g.xml&&0<g.xml.length&&this.setFileData(g.xml);q=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ca=this.getXmlFileData();q.xml=mxUtils.getXml(ca);q.data=this.getFileData(null,null,!0,null,null,null,ca);q.format=g.format}else if("html"==g.format)G=this.editor.getGraphXml(),q.data=this.getHtml(G,this.editor.graph),q.xml=mxUtils.getXml(G),q.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ba=this.editor.graph.background;
+ba==mxConstants.NONE&&(ba=null);q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);q.format="svg";var W=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(q),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,W,null,null,g.embedImages);else if(null==
+g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var S=this.editor.graph.getSvg(ba);this.embedFonts(S,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){W(mxUtils.getXml(a))})):W(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(q),"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&
+(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&
+this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(X){this.handleError(X)}}var V=
+mxUtils.bind(this,function(g,f){d=!0;try{a(g,f)}catch(P){this.handleError(P)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=l();if(c!=e&&!d){var g=this.createLoadMessage("autosave");g.xml=c;c=JSON.stringify(g);(window.opener||window.parent).postMessage(c,"*")}e=c}),
+this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",
+b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){V(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&V(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){V(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),V(g,f))}}));var k=window.opener||window.parent,f="json"==urlParams.proto?
+JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
+mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
+mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));
+a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,
+l=null,z=null,y=null,A=null,x=null,B=null,C=null,D="",F="auto",G="auto",E=null,J=null,K=40,H=40,L=100,M=0,I=this.editor.graph;I.getGraphBounds();for(var U=function(){null!=b?b(ja):(I.setSelectionCells(ja),I.scrollCellToVisible(I.getSelectionCell()))},T=I.getFreeInsertPoint(),ca=T.x,ba=T.y,T=ba,W=null,S="auto",C=null,V=[],X=null,Z=null,aa=0;aa<c.length&&"#"==c[aa].charAt(0);){a=c[aa];for(aa++;aa<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[aa].substring(1)),
+aa++;if("#"!=a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),N=mxUtils.trim(a.substring(P+1));"label"==Q?W=I.sanitizeHtml(N):"labelname"==Q&&0<N.length&&"-"!=N?y=N:"labels"==Q&&0<N.length&&"-"!=N?A=JSON.parse(N):"style"==Q?k=N:"parentstyle"==Q?x=N:"stylename"==Q&&0<N.length&&"-"!=N?z=N:"styles"==Q&&0<N.length&&"-"!=N?l=JSON.parse(N):"identity"==Q&&0<N.length&&"-"!=N?B=N:"parent"==Q&&0<N.length&&"-"!=N?C=N:"namespace"==Q&&0<N.length&&"-"!=N?D=N:"width"==Q?F=N:"height"==
+Q?G=N:"left"==Q&&0<N.length?E=N:"top"==Q&&0<N.length?J=N:"ignore"==Q?Z=N.split(","):"connect"==Q?V.push(JSON.parse(N)):"link"==Q?X=N:"padding"==Q?M=parseFloat(N):"edgespacing"==Q?K=parseFloat(N):"nodespacing"==Q?H=parseFloat(N):"levelspacing"==Q?L=parseFloat(N):"layout"==Q&&(S=N)}}}if(null==c[aa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(c[aa]),Q=P=null,N=[],R=0;R<ga.length;R++)B==ga[R]&&(P=R),C==ga[R]&&(Q=R),N.push(mxUtils.trim(ga[R]).replace(/[^a-z0-9]+/ig,
+"_").replace(/^\d+/,"").replace(/_+$/,""));null==W&&(W="%"+N[0]+"%");if(null!=V)for(var Y=0;Y<V.length;Y++)null==g[V[Y].to]&&(g[V[Y].to]={});B=[];for(R=aa+1;R<c.length;R++){var da=this.editor.csvToArray(c[R]);if(null==da){var ta=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(ta+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&B.push(da)}I.model.beginUpdate();try{for(R=0;R<B.length;R++){var da=B[R],O=null,ha=null!=P?D+da[P]:null;null!=ha&&(O=I.model.getCell(ha));
+var c=null!=O,fa=new mxCell(W,new mxGeometry(ca,T,0,0),k||"whiteSpace=wrap;html=1;");fa.vertex=!0;fa.id=ha;for(var ea=0;ea<da.length;ea++)I.setAttributeForCell(fa,N[ea],da[ea]);if(null!=y&&null!=A){var ka=A[fa.getAttribute(y)];null!=ka&&I.labelChanged(fa,ka)}if(null!=z&&null!=l){var pa=l[fa.getAttribute(z)];null!=pa&&(fa.style=pa)}I.setAttributeForCell(fa,"placeholders","1");fa.style=I.replacePlaceholders(fa,fa.style);c&&(I.model.setGeometry(O,fa.geometry),I.model.setStyle(O,fa.style),0>mxUtils.indexOf(e,
+O)&&e.push(O));O=fa;if(!c)for(Y=0;Y<V.length;Y++)g[V[Y].to][O.getAttribute(V[Y].to)]=O;null!=X&&"link"!=X&&(I.setLinkForCell(O,O.getAttribute(X)),I.setAttributeForCell(O,X,null));I.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var ia=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=E&&null!=O.getAttribute(E)&&(O.geometry.x=ca+parseFloat(O.getAttribute(E))),null!=J&&null!=O.getAttribute(J)&&(O.geometry.y=ba+parseFloat(O.getAttribute(J))),"@"==F.charAt(0)&&null!=O.getAttribute(F.substring(1))?
+O.geometry.width=parseFloat(O.getAttribute(F.substring(1))):O.geometry.width="auto"==F?ia.width+M:parseFloat(F),"@"==G.charAt(0)&&null!=O.getAttribute(G.substring(1))?O.geometry.height=parseFloat(O.getAttribute(G.substring(1))):O.geometry.height="auto"==G?ia.height+M:parseFloat(G),T+=O.geometry.height+H);c?(null==f[ha]&&(f[ha]=[]),f[ha].push(O)):(C=null!=Q?I.model.getCell(D+da[Q]):null,d.push(O),null!=C?(C.style=I.replacePlaceholders(C,x),I.addCell(O,C)):e.push(I.addCell(O)))}for(var la=e.slice(),
+ja=e.slice(),Y=0;Y<V.length;Y++)for(var wa=V[Y],R=0;R<d.length;R++){var O=d[R],qa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(I.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?I.replacePlaceholders(l,
+c.style):I.createCurrentEdgeStyle();ja.push(I.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,l));mxUtils.remove(c.invert?a:f,la)}}});qa(O,O,wa);if(null!=f[O.id])for(ea=0;ea<f[O.id].length;ea++)qa(O,f[O.id][ea],wa)}if(null!=Z)for(R=0;R<d.length;R++)for(O=d[R],ea=0;ea<Z.length;ea++)I.setAttributeForCell(O,mxUtils.trim(Z[ea]),null);if(0<e.length){var ma=new mxParallelEdgeLayout(I);ma.spacing=K;var ua=function(){0<ma.spacing&&ma.execute(I.getDefaultParent());for(var a=0;a<e.length;a++){var b=I.getCellGeometry(e[a]);
+b.x=Math.round(I.snap(b.x));b.y=Math.round(I.snap(b.y));"auto"==F&&(b.width=Math.round(I.snap(b.width)));"auto"==G&&(b.height=Math.round(I.snap(b.height)))}};if("["==S.charAt(0)){var va=U;I.view.validate();this.executeLayoutList(JSON.parse(S),function(){ua();va()});U=null}else if("circle"==S){var ra=new mxCircleLayout(I);ra.resetEdges=!1;var xa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(I.getDefaultParent());
+ua()},!0,U);U=null}else if("horizontaltree"==S||"verticaltree"==S||"auto"==S&&ja.length==2*e.length-1&&1==la.length){I.view.validate();var sa=new mxCompactTreeLayout(I,"horizontaltree"==S);sa.levelDistance=H;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(I.getDefaultParent(),0<la.length?la[0]:null)},!0,U);U=null}else if("horizontalflow"==S||"verticalflow"==S||"auto"==S&&1==la.length){I.view.validate();var na=new mxHierarchicalLayout(I,"horizontalflow"==S?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);na.intraCellSpacing=H;na.parallelEdgeSpacing=K;na.interRankCellSpacing=L;na.disableEdgeStyle=!1;this.executeLayout(function(){na.execute(I.getDefaultParent(),ja);I.moveCells(ja,ca,ba)},!0,U);U=null}else if("organic"==S||"auto"==S&&ja.length>e.length){I.view.validate();var oa=new mxFastOrganicLayout(I);oa.forceConstant=3*H;oa.resetEdges=!1;var ya=oa.isVertexIgnored;oa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ma=new mxParallelEdgeLayout(I);
+ma.spacing=K;this.executeLayout(function(){oa.execute(I.getDefaultParent());ua()},!0,U);U=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=U&&U()}}catch(za){this.handleError(za)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=
+function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=
+EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};
+var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();
+return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+
+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&
+(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&
+c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);
+c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
+a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
+function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){f.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
+this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));
+this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};
+var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);l.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,f,k,l){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,
+"svg",mxUtils.getXml(d.getSvg(e,f,k)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),m=d.getGraphBounds(),n=Math.floor(m.width*f/d.view.scale),p=Math.floor(m.height*f/d.view.scale);if(g.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var x={globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):
+"")+"&extras="+encodeURIComponent(JSON.stringify(x))+(0<l?"&dpi="+l:"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(g))})}else"png"==c?a.exportImage(f,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,l):a.exportImage(f,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var e=
+a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),e.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var l=k[a];if("R"==l.substring(0,1)){var v=JSON.parse(decodeURIComponent(l.substring(1)));f[v[0]]={id:v[0],title:v[1],downloadUrl:v[2]}}}}catch(z){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML=
+"";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
+mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,
+mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
+allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=
+a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,e,f){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);
+d&&e.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:f});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=
+b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,
+k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(z){c(null,"Invalid Call: An error occured, "+z.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),
+c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(t){null!=b&&b(t)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");
+b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,
+a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(G){console.log(G)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(G){console.log(G)}});a=mxUtils.bind(this,function(a){try{if(a.source==
+b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(E){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(E){console.log(E)}});window.addEventListener("message",
+a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,f){this.openDatabase(mxUtils.bind(this,function(d){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=d.transaction(f,"readwrite");g.oncomplete=c;g.onerror=e;for(d=0;d<f.length;d++)g.objectStore(f[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(q){null!=e&&e(q)}}),e)};
+EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=
+c}catch(t){null!=c&&c(t)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=
+c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():
+!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();
+return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==
+DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,c,e,f,k,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,c,e,f,k,l,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};
+EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,c,e,f,k,l,q,v,z,y,A,x,B,C){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(a,b,c,e,f,k,l,q,v,z,y,A,x,B,C)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,c,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,c,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
+return Editor.writeGraphModelToPng(a,b,c,e,f)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var f="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(f||
+e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,e,c,b,k,f){function l(){for(var a=A.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==A&&b++;x.style.display=0==b?"block":"none"}function d(a,b,c,d){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),l()):e();v=null});n.className="geCommentEditBtn";m.appendChild(n);var x=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
 function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(x.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));x.focus();x.className="geCommentEditBtn gePrimaryBtn";m.appendChild(x);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function g(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function m(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function v(b,c,e,f,k){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});E.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function z(c,e,g,k,l){function x(){m(q);b.addReply(t,function(a){t.id=a;b.replies.push(t);p(q);g&&g()},function(b){B();n(q);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,l)}function B(){d(t,q,function(a){x()},!0)}var u=C().pdiv,t=a.newComment(c,a.getCurrentUser());t.pCommentId=b.id;null==b.replies&&(b.replies=[]);var q=v(t,b.replies,u,f+1);e?B():x()}if(k||!b.isResolved){x.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite");
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function m(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function u(b,c,e,f,k){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});E.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=z;a(b);return{pdiv:d,replies:c}}function y(c,e,g,k,l){function x(){m(q);b.addReply(t,function(a){t.id=a;b.replies.push(t);p(q);g&&g()},function(b){B();n(q);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,l)}function B(){d(t,q,function(a){x()},!0)}var v=C().pdiv,t=a.newComment(c,a.getCurrentUser());t.pCommentId=b.id;null==b.replies&&(b.replies=[]);var q=u(t,b.replies,v,f+1);e?B():x()}if(k||!b.isResolved){x.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite");
 var H=document.createElement("div");H.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=b.user.pictureUrl||Editor.userImage;H.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";H.appendChild(F);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,b.user.displayName||"");F.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",b.id);g(b,
-G);F.appendChild(G);y.appendChild(H);H=document.createElement("div");H.className="geCommentTxt";mxUtils.write(H,b.content||"");y.appendChild(H);H=document.createElement("div");H.className="geCommentActions";var E=document.createElement("ul");E.className="geCommentActionsList";H.appendChild(E);t||0!=f&&!q||B(mxResources.get("reply"),function(){z("",!0)},b.isResolved);F=a.getCurrentUser();null==F||F.id!=b.user.id||t||(B(mxResources.get("edit"),function(){function c(){d(b,y,function(){m(y);b.editComment(b.content,
-function(){p(y)},function(b){n(y);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){m(y);b.deleteComment(function(){for(var a=C(b).replies,d=0;d<a.length;d++)A.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}x.style.display=0==A.getElementsByTagName("div").length?"block":"none"},function(b){n(y);a.handleError(b,null,null,
+G);F.appendChild(G);z.appendChild(H);H=document.createElement("div");H.className="geCommentTxt";mxUtils.write(H,b.content||"");z.appendChild(H);H=document.createElement("div");H.className="geCommentActions";var E=document.createElement("ul");E.className="geCommentActionsList";H.appendChild(E);t||0!=f&&!q||B(mxResources.get("reply"),function(){y("",!0)},b.isResolved);F=a.getCurrentUser();null==F||F.id!=b.user.id||t||(B(mxResources.get("edit"),function(){function c(){d(b,z,function(){m(z);b.editComment(b.content,
+function(){p(z)},function(b){n(z);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){m(z);b.deleteComment(function(){for(var a=C(b).replies,d=0;d<a.length;d++)A.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}x.style.display=0==A.getElementsByTagName("div").length?"block":"none"},function(b){n(z);a.handleError(b,null,null,
 null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));t||0!=f||B(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),
-m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);D||(e[g].style.display="none")}l()}b.isResolved?z(mxResources.get("reOpened")+": ",!0,c,!1,!0):z(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(H);null!=e?A.insertBefore(y,e.nextSibling):A.appendChild(y);for(e=0;null!=b.replies&&e<b.replies.length;e++)H=b.replies[e],H.isResolved=b.isResolved,v(H,b.replies,null,f+1,k);null!=u&&(u.comment.id==b.id?(k=b.content,b.content=u.comment.content,d(b,y,u.saveCallback,u.deleteOnCancel),
-b.content=k):null==u.comment.id&&u.comment.pCommentId==b.id&&(A.appendChild(u.div),d(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return y}}var t=!a.canComment(),q=a.canReplyToReplies(),u=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);D||(e[g].style.display="none")}l()}b.isResolved?y(mxResources.get("reOpened")+": ",!0,c,!1,!0):y(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(H);null!=e?A.insertBefore(z,e.nextSibling):A.appendChild(z);for(e=0;null!=b.replies&&e<b.replies.length;e++)H=b.replies[e],H.isResolved=b.isResolved,u(H,b.replies,null,f+1,k);null!=v&&(v.comment.id==b.id?(k=b.content,b.content=v.comment.content,d(b,z,v.saveCallback,v.deleteOnCancel),
+b.content=k):null==v.comment.id&&v.comment.pCommentId==b.id&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return z}}var t=!a.canComment(),q=a.canReplyToReplies(),v=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
 Dialog.backdropColor;A.style.bottom=parseInt(y)+7+"px";z.appendChild(A);var x=document.createElement("span");x.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(x,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=y;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter=
 "none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!t){var C=y.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';C.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(C,"click",function(b){function c(){d(e,f,function(b){m(f);a.addComment(b,function(a){b.id=a;F.push(b);p(f)},function(b){n(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var e=a.newComment("",a.getCurrentUser()),f=v(e,F,null,0);c();b.preventDefault();mxEvent.consume(b)});B.appendChild(C)}C=y.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';C.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});B.appendChild(C);a.commentsRefreshNeeded()&&
+!0)}var e=a.newComment("",a.getCurrentUser()),f=u(e,F,null,0);c();b.preventDefault();mxEvent.consume(b)});B.appendChild(C)}C=y.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';C.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});B.appendChild(C);a.commentsRefreshNeeded()&&
 (C=y.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(C.style.filter="invert(100%)"),mxEvent.addListener(C,"click",function(a){G();a.preventDefault();mxEvent.consume(a)}),B.appendChild(C));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),B.appendChild(y));z.appendChild(B);var F=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var b=u.div.querySelector(".geCommentEditTxtArea"),c=u.div.querySelector(".geCommentEditBtns");u.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(H){a.handleError(H)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),B.appendChild(y));z.appendChild(B);var F=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(H){a.handleError(H)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
 IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});A.innerHTML="";A.appendChild(x);x.style.display="block";F=a;for(a=0;a<F.length;a++)b(F[a].replies),
-v(F[a],F,null,0,D);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&(A.appendChild(u.div),d(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(g(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
+u(F[a],F,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(g(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
 if(this.window.isVisible()){for(var b=A.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<F.length;d++)a(F[d])}});setInterval(B,6E4);this.refreshCommentsTime=B;this.window=new mxWindow(mxResources.get("comments"),z,e,c,b,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
 mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var E=mxUtils.bind(this,function(){var a=this.window.getX(),
-b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",E);this.destroy=function(){mxEvent.removeListener(window,"resize",E);this.window.destroy()}},ConfirmDialog=function(a,e,c,b,k,f,l,d,g,m,n){var p=document.createElement("div");p.style.textAlign="center";n=null!=n?n:44;var v=document.createElement("div");v.style.padding="6px";v.style.overflow="auto";v.style.maxHeight=n+"px";v.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(v.style.height="60px");mxUtils.write(v,e);
-p.appendChild(v);null!=m&&(v=document.createElement("div"),v.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),v.appendChild(e),p.appendChild(v));m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(t.checked)});f.className="geBtn";null!=d&&(f.innerHTML=d+"<br>"+f.innerHTML,f.style.paddingBottom=
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",E);this.destroy=function(){mxEvent.removeListener(window,"resize",E);this.window.destroy()}},ConfirmDialog=function(a,e,c,b,k,f,l,d,g,m,n){var p=document.createElement("div");p.style.textAlign="center";n=null!=n?n:44;var u=document.createElement("div");u.style.padding="6px";u.style.overflow="auto";u.style.maxHeight=n+"px";u.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(u.style.height="60px");mxUtils.write(u,e);
+p.appendChild(u);null!=m&&(u=document.createElement("div"),u.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),u.appendChild(e),p.appendChild(u));m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(t.checked)});f.className="geBtn";null!=d&&(f.innerHTML=d+"<br>"+f.innerHTML,f.style.paddingBottom=
 "8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&m.appendChild(f);var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(t.checked)});m.appendChild(q);null!=l?(q.innerHTML=l+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||m.appendChild(f);p.appendChild(m);g?(m.style.marginTop=
-"10px",v=document.createElement("p"),v.style.marginTop="20px",v.appendChild(t),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),v.appendChild(k),p.appendChild(v),mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)})):m.style.marginTop="12px";this.init=function(){q.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+"10px",u=document.createElement("p"),u.style.marginTop="20px",u.appendChild(t),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),u.appendChild(k),p.appendChild(u),mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)})):m.style.marginTop="12px";this.init=function(){q.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
 EditorUi.prototype.patchPages=function(a,e,c,b,k){var f={},l=[],d={},g={},m={},n={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var p in b[EditorUi.DIFF_UPDATE])f[p]=b[EditorUi.DIFF_UPDATE][p];if(null!=e[EditorUi.DIFF_REMOVE])for(b=0;b<e[EditorUi.DIFF_REMOVE].length;b++)g[e[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(b=0;b<e[EditorUi.DIFF_INSERT].length;b++)d[e[EditorUi.DIFF_INSERT][b].previous]=e[EditorUi.DIFF_INSERT][b];if(null!=e[EditorUi.DIFF_UPDATE])for(p in e[EditorUi.DIFF_UPDATE])b=
-e[EditorUi.DIFF_UPDATE][p],null!=b.previous&&(n[b.previous]=p);if(null!=a){var v="";for(b=0;b<a.length;b++){var t=a[b].getId();m[t]=a[b];null!=n[v]||g[t]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][t]&&null!=e[EditorUi.DIFF_UPDATE][t].previous||(n[v]=t);v=t}}var q={},u=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!q[b]){q[b]=!0;l.push(a);var g=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][b]:null;null!=g&&(this.updatePageRoot(a),null!=g.name&&a.setName(g.name),
-null!=g.view&&this.patchViewState(a,g.view),null!=g.cells&&this.patchPage(a,g.cells,f[a.getId()],k),!c||null==g.cells&&null==g.view||(a.needsUpdate=!0))}a=n[b];null!=a&&(delete n[b],u(m[a]));a=d[b];null!=a&&(delete d[b],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=m[a.getId()];null==b?u(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});u();for(p in n)u(m[n[p]]),
+e[EditorUi.DIFF_UPDATE][p],null!=b.previous&&(n[b.previous]=p);if(null!=a){var u="";for(b=0;b<a.length;b++){var t=a[b].getId();m[t]=a[b];null!=n[u]||g[t]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][t]&&null!=e[EditorUi.DIFF_UPDATE][t].previous||(n[u]=t);u=t}}var q={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!q[b]){q[b]=!0;l.push(a);var g=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][b]:null;null!=g&&(this.updatePageRoot(a),null!=g.name&&a.setName(g.name),
+null!=g.view&&this.patchViewState(a,g.view),null!=g.cells&&this.patchPage(a,g.cells,f[a.getId()],k),!c||null==g.cells&&null==g.view||(a.needsUpdate=!0))}a=n[b];null!=a&&(delete n[b],v(m[a]));a=d[b];null!=a&&(delete d[b],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=m[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(p in n)v(m[n[p]]),
 delete n[p];for(p in d)z(d[p]),delete d[p];return l};EditorUi.prototype.patchViewState=function(a,e){if(null!=a.viewState&&null!=e){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in e)a.viewState[c]=JSON.parse(e[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
 EditorUi.prototype.createParentLookup=function(a,e){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=e[EditorUi.DIFF_INSERT])for(var k=0;k<e[EditorUi.DIFF_INSERT].length;k++){var f=e[EditorUi.DIFF_INSERT][k],l=null!=f.parent?f.parent:"",d=null!=f.previous?f.previous:"";c(l).inserted[d]=f}if(null!=e[EditorUi.DIFF_UPDATE])for(var g in e[EditorUi.DIFF_UPDATE])f=e[EditorUi.DIFF_UPDATE][g],null!=f.previous&&(l=f.parent,null==l&&(k=a.getCell(g),null!=k&&(k=
 a.getParent(k),null!=k&&(l=k.getId()))),null!=l&&(c(l).moved[f.previous]=g));return b};
-EditorUi.prototype.patchPage=function(a,e,c,b){var k=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(k,e);k.beginUpdate();try{var l=k.updateEdgeParent,d=new mxDictionary,g=[];k.updateEdgeParent=function(a,c){!d.get(a)&&b&&(d.put(a,!0),g.push(a))};var m=f[""],n=null!=m&&null!=m.inserted?m.inserted[""]:null,p=null;null!=n&&(p=this.getCellForJson(n));if(null==p){var v=null!=m&&null!=m.moved?m.moved[""]:null;null!=v&&(p=k.getCell(v))}null!=p&&(k.setRoot(p),
-a.root=p);this.patchCellRecursive(a,k,k.root,f,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var t=0;t<e[EditorUi.DIFF_REMOVE].length;t++){var q=k.getCell(e[EditorUi.DIFF_REMOVE][t]);null!=q&&k.remove(q)}if(null!=e[EditorUi.DIFF_UPDATE]){var u=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(v in e[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(v),e[EditorUi.DIFF_UPDATE][v],null!=u?u[v]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(t=0;t<e[EditorUi.DIFF_INSERT].length;t++)n=e[EditorUi.DIFF_INSERT][t],
+EditorUi.prototype.patchPage=function(a,e,c,b){var k=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(k,e);k.beginUpdate();try{var l=k.updateEdgeParent,d=new mxDictionary,g=[];k.updateEdgeParent=function(a,c){!d.get(a)&&b&&(d.put(a,!0),g.push(a))};var m=f[""],n=null!=m&&null!=m.inserted?m.inserted[""]:null,p=null;null!=n&&(p=this.getCellForJson(n));if(null==p){var u=null!=m&&null!=m.moved?m.moved[""]:null;null!=u&&(p=k.getCell(u))}null!=p&&(k.setRoot(p),
+a.root=p);this.patchCellRecursive(a,k,k.root,f,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var t=0;t<e[EditorUi.DIFF_REMOVE].length;t++){var q=k.getCell(e[EditorUi.DIFF_REMOVE][t]);null!=q&&k.remove(q)}if(null!=e[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(u in e[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(u),e[EditorUi.DIFF_UPDATE][u],null!=v?v[u]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(t=0;t<e[EditorUi.DIFF_INSERT].length;t++)n=e[EditorUi.DIFF_INSERT][t],
 q=k.getCell(n.id),null!=q&&(k.setTerminal(q,k.getCell(n.source),!0),k.setTerminal(q,k.getCell(n.target),!1));k.updateEdgeParent=l;if(b&&0<g.length)for(t=0;t<g.length;t++)k.contains(g[t])&&k.updateEdgeParent(g[t])}finally{k.endUpdate()}};
 EditorUi.prototype.patchCellRecursive=function(a,e,c,b,k){if(null!=c){for(var f=b[c.getId()],l=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},d=0,g=e.getChildCount(c),m="",n=0;n<g;n++){var p=e.getChildAt(c,n).getId();null==f[m]&&(null==k[EditorUi.DIFF_UPDATE]||null==k[EditorUi.DIFF_UPDATE][p]||null==k[EditorUi.DIFF_UPDATE][p].previous&&null==k[EditorUi.DIFF_UPDATE][p].parent)&&(f[m]=p);m=p}g=mxUtils.bind(this,function(f,g){var l=null!=f?f.getId():"";if(null!=f&&g){var m=
 e.getCell(l);null!=m&&m!=f&&(f=null)}null!=f&&(e.getChildAt(c,d)!=f&&e.add(c,f,d),this.patchCellRecursive(a,e,f,b,k),d++);return l});for(m=[null];0<m.length;)if(n=m.shift(),n=g(null!=n?n.child:null,null!=n?n.insert:!1),p=f[n],null!=p&&(delete f[n],m.push({child:e.getCell(p)})),p=l[n],null!=p&&(delete l[n],m.push({child:this.getCellForJson(p),insert:!0})),0==m.length){for(n in f)m.push({child:e.getCell(f[n])}),delete f[n];for(n in l)m.push({child:this.getCellForJson(l[n]),insert:!0}),delete l[n]}}};
 EditorUi.prototype.patchCell=function(a,e,c,b){if(null!=e&&null!=c){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in c?a.setValue(e,c.value):null!=c.xmlValue&&a.setValue(e,mxUtils.parseXml(c.xmlValue).documentElement);null!=b&&null!=b.style||null==c.style||a.setStyle(e,c.style);null!=c.visible&&a.setVisible(e,1==c.visible);null!=c.collapsed&&a.setCollapsed(e,1==c.collapsed);null!=c.vertex&&(e.vertex=1==c.vertex);null!=c.edge&&(e.edge=1==c.edge);null!=c.connectable&&(e.connectable=
 1==c.connectable);null!=c.geometry&&a.setGeometry(e,this.codec.decode(mxUtils.parseXml(c.geometry).documentElement));null!=c.source&&a.setTerminal(e,a.getCell(c.source),!0);null!=c.target&&a.setTerminal(e,a.getCell(c.target),!1);for(var k in c)this.cellProperties[k]||(e[k]=c[k])}};
 EditorUi.prototype.getPagesForNode=function(a,e){var c=this.editor.extractGraphModel(a,!0,!0);null!=c&&(a=c);var c=a.getElementsByTagName(e||"diagram"),b=[];if(0<c.length)for(var k=0;k<c.length;k++){var f=new DiagramPage(c[k]);this.updatePageRoot(f,!0);b.push(f)}else"mxGraphModel"==a.nodeName&&(f=new DiagramPage(a.ownerDocument.createElement("diagram")),f.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(f.node,Graph.compressNode(a,!0)),b.push(f));return b};
-EditorUi.prototype.diffPages=function(a,e){for(var c=[],b=[],k={},f={},l={},d=null,g=0;g<e.length;g++)f[e[g].getId()]={page:e[g],prev:d},d=e[g];d=null;for(g=0;g<a.length;g++){var m=a[g].getId(),n=f[m];if(null==n)b.push(m);else{var p=this.diffPage(a[g],n.page),v={};0<Object.keys(p).length&&(v.cells=p);p=this.diffViewState(a[g],n.page);0<Object.keys(p).length&&(v.view=p);if((null!=n.prev?null==d:null!=d)||null!=d&&null!=n.prev&&d.getId()!=n.prev.getId())v.previous=null!=n.prev?n.prev.getId():"";null!=
-n.page.getName()&&a[g].getName()!=n.page.getName()&&(v.name=n.page.getName());0<Object.keys(v).length&&(l[m]=v)}delete f[a[g].getId()];d=a[g]}for(m in f)n=f[m],c.push({data:mxUtils.getXml(n.page.node),previous:null!=n.prev?n.prev.getId():""});0<Object.keys(l).length&&(k[EditorUi.DIFF_UPDATE]=l);0<b.length&&(k[EditorUi.DIFF_REMOVE]=b);0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
+EditorUi.prototype.diffPages=function(a,e){for(var c=[],b=[],k={},f={},l={},d=null,g=0;g<e.length;g++)f[e[g].getId()]={page:e[g],prev:d},d=e[g];d=null;for(g=0;g<a.length;g++){var m=a[g].getId(),n=f[m];if(null==n)b.push(m);else{var p=this.diffPage(a[g],n.page),u={};0<Object.keys(p).length&&(u.cells=p);p=this.diffViewState(a[g],n.page);0<Object.keys(p).length&&(u.view=p);if((null!=n.prev?null==d:null!=d)||null!=d&&null!=n.prev&&d.getId()!=n.prev.getId())u.previous=null!=n.prev?n.prev.getId():"";null!=
+n.page.getName()&&a[g].getName()!=n.page.getName()&&(u.name=n.page.getName());0<Object.keys(u).length&&(l[m]=u)}delete f[a[g].getId()];d=a[g]}for(m in f)n=f[m],c.push({data:mxUtils.getXml(n.page.node),previous:null!=n.prev?n.prev.getId():""});0<Object.keys(l).length&&(k[EditorUi.DIFF_UPDATE]=l);0<b.length&&(k[EditorUi.DIFF_REMOVE]=b);0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
 EditorUi.prototype.createCellLookup=function(a,e,c){c=null!=c?c:{};c[a.getId()]={cell:a,prev:e};var b=a.getChildCount();e=null;for(var k=0;k<b;k++){var f=a.getChildAt(k);this.createCellLookup(f,e,c);e=f}return c};
 EditorUi.prototype.diffCellRecursive=function(a,e,c,b,k){b=null!=b?b:{};var f=c[a.getId()];delete c[a.getId()];if(null==f)k.push(a.getId());else{var l=this.diffCell(a,f.cell);if(null!=l.parent||(null!=f.prev?null==e:null!=e)||null!=e&&null!=f.prev&&e.getId()!=f.prev.getId())l.previous=null!=f.prev?f.prev.getId():"";0<Object.keys(l).length&&(b[a.getId()]=l)}f=a.getChildCount();e=null;for(l=0;l<f;l++){var d=a.getChildAt(l);this.diffCellRecursive(d,e,c,b,k);e=d}return b};
 EditorUi.prototype.diffPage=function(a,e){var c=[],b=[],k={};this.updatePageRoot(a);this.updatePageRoot(e);var f=this.createCellLookup(e.root),l=this.diffCellRecursive(a.root,null,f,l,b),d;for(d in f){var g=f[d];c.push(this.getJsonForCell(g.cell,g.prev))}0<Object.keys(l).length&&(k[EditorUi.DIFF_UPDATE]=l);0<b.length&&(k[EditorUi.DIFF_REMOVE]=b);0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
@@ -9524,13 +9525,13 @@ DrawioFileSync.prototype.fileChanged=function(a,e,c,b){return this.notifyThread=
 DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};
 DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
 DrawioFileSync.prototype.catchup=function(a,e,c,b){if(null!=a&&(null==b||!b())){var k=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==k)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=e&&e();else if(this.isValidState()){var l=this.file.getDescriptorSecret(a),d=0,g=!1,m=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var n=!0,p=window.setTimeout(mxUtils.bind(this,function(){n=!1;
-this.reload(e,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(k)+(null!=l?"&secret="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(p);if(n&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var l=null,v=[];if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var u=
-JSON.parse(k.getText());if(null!=u&&0<u.length)for(var z=0;z<u.length;z++){var y=this.stringToObject(u[z]);if(y.v>DrawioFileSync.PROTOCOL){g=!0;v=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)l=y.d.checksum,v.push(y.d.patch);else{g=!0;v=[];break}}}catch(A){v=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<v.length?(this.file.stats.cacheHits++,this.merge(v,l,a,e,c,b)):d<=this.maxCacheReadyRetries-1&&!g&&401!=k.getStatus()?(d++,this.file.stats.cacheMiss++,window.setTimeout(m,
+this.reload(e,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(k)+(null!=l?"&secret="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(p);if(n&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var l=null,u=[];if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var v=
+JSON.parse(k.getText());if(null!=v&&0<v.length)for(var z=0;z<v.length;z++){var y=this.stringToObject(v[z]);if(y.v>DrawioFileSync.PROTOCOL){g=!0;u=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)l=y.d.checksum,u.push(y.d.patch);else{g=!0;u=[];break}}}catch(A){u=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<u.length?(this.file.stats.cacheHits++,this.merge(u,l,a,e,c,b)):d<=this.maxCacheReadyRetries-1&&!g&&401!=k.getStatus()?(d++,this.file.stats.cacheMiss++,window.setTimeout(m,
 (d+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,c,b))}catch(A){null!=c&&c(A)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(m,this.cacheReadyDelay)}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,e,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=e&&e(a)}),c,b)};
 DrawioFileSync.prototype.merge=function(a,e,c,b,k,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var l=this.file.ignorePatches(a),d=this.file.getDescriptorRevisionId(c);if(!l){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
 a[f]);var g=null!=e?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",d,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",e==g,e);if(null!=e&&e!=g){var m=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(d);this.file.checksumError(k,a,"From: "+m+"\nTo: "+n+"\nChecksum: "+e+"\nCurrent: "+g,d,"merge");
 return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(t){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=k&&k(t);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(d),this.file.sendErrorReport("Error in merge",
-"From: "+m+"\nTo: "+n+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),t);else{var p=this.file.getCurrentUser(),v=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,t)}}catch(q){}}};
+"From: "+m+"\nTo: "+n+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),t);else{var p=this.file.getCurrentUser(),u=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),u,t)}}catch(q){}}};
 DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),c=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(c)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()};
 DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
 DrawioFileSync.prototype.fileSaved=function(a,e,c,b){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var k=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);b=this.ui.getHashValueForPages(a);k=this.ui.diffPages(k,a);e=this.file.getDescriptorRevisionId(e);
@@ -9546,7 +9547,7 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.wai
 mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
 mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,e,c,b){};mxAsyncCanvas.prototype.roundrect=function(a,e,c,b,k,f){};mxAsyncCanvas.prototype.ellipse=function(a,e,c,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
 mxAsyncCanvas.prototype.image=function(a,e,c,b,k,f,l,d){k=this.rewriteImageSource(k);a=this.htmlCanvas.images[k];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[k]=a,a.src=k)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,e,c,b,k,f,l,d,g,m,n,p){if(null!=k&&0!=k.length&&(a=this.state.scale,"html"==g&&"function"===typeof html2canvas)){this.incWaitCounter();var v=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[v]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.text=function(a,e,c,b,k,f,l,d,g,m,n,p){if(null!=k&&0!=k.length&&(a=this.state.scale,"html"==g&&"function"===typeof html2canvas)){this.incWaitCounter();var u=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[u]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
 mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,b,k){return c+c+b+b+k+k});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
 mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};
 mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,e){this.state.dx+=a;this.state.dy+=e;this.ctx.translate(a,e)};
@@ -9577,7 +9578,7 @@ DriveFile.prototype.getPublicUrl=function(a){this.ui.drive.executeRequest({url:"
 DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(a,e,c,b,k){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,e,c,b,k)}),c,b,k])};
 DriveFile.prototype.saveFile=function(a,e,c,b,k,f){try{if(!this.isEditable())null!=c&&c();else if(!this.savingFile){var l=mxUtils.bind(this,function(a,f){var d=null,g=null;try{d=this.isModified;g=this.isModified();this.setModified(!1);this.savingFileTime=new Date;this.savingFile=!0;this.isModified=function(){return!0};var p=this.desc;this.ui.drive.saveFile(this,f,mxUtils.bind(this,function(a,f){try{this.savingFile=!1,this.isModified=d,0!=a?(e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
 Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(f,p,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b)):(this.setModified(g||this.isModified()),null!=b&&b(a))}catch(q){if(this.setModified(g||this.isModified()),null!=b)b(q);else throw q;}}),mxUtils.bind(this,function(c,e){try{this.savingFile=!1,this.isModified=d,this.setModified(g||this.isModified()),this.isConflict(c)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=
-!0,this.savingFileTime=new Date,this.sync.fileConflict(e,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();l(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(c)}catch(q){if(this.setModified(g||this.isModified()),null!=b)b(q);else throw q;}}),k,k,a)}catch(v){if(this.savingFile=!1,null!=d&&(this.isModified=d),null!=g&&this.setModified(g||this.isModified()),null!=b)b(v);else throw v;
+!0,this.savingFileTime=new Date,this.sync.fileConflict(e,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();l(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(c)}catch(q){if(this.setModified(g||this.isModified()),null!=b)b(q);else throw q;}}),k,k,a)}catch(u){if(this.savingFile=!1,null!=d&&(this.isModified=d),null!=g&&this.setModified(g||this.isModified()),null!=b)b(u);else throw u;
 }});l(f,e)}}catch(d){if(null!=b)b(d);else throw d;}};DriveFile.prototype.copyFile=function(a,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,e)}catch(c){e(c)}}),e,!0)};
 DriveFile.prototype.makeCopy=function(a,e,c){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,c),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(a,e,c){this.ui.drive.copyFile(this.getId(),a,e,c)};
 DriveFile.prototype.rename=function(a,e,c){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(k){this.hasSameExtension(a,this.getTitle())?(this.desc=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=e&&e(k)):(this.desc=k,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,e,c))}),c)};
@@ -9603,8 +9604,8 @@ DriveClient.prototype.execute=function(a){var e=mxUtils.bind(this,function(c){th
 mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,e)};
 DriveClient.prototype.executeRequest=function(a,e,c){try{var b=!0,k=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=a;null!=k&&window.clearTimeout(k);k=window.setTimeout(mxUtils.bind(this,function(){b=!1;null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:l})}),this.ui.timeout);var d=null,g=!1;"string"===typeof a.params?d=a.params:null!=a.params&&(d=JSON.stringify(a.params),
 g=!0);var m=a.fullUrl||this.GDriveBaseUrl+a.url;g&&(m+=(0<m.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(m,d,a.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):g&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(d){try{if(window.clearTimeout(k),
-b){var g;try{g=JSON.parse(d.getText())}catch(u){g=null}if(200<=d.getStatus()&&299>=d.getStatus())null!=e&&e(g);else{var m=null!=g&&null!=g.error?null!=g.error.data?g.error.data:g.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==c||null==g||null==g.error||-1!=g.error.code&&(403!=g.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=g.error.message)?null!=g&&null!=g.error&&(401==g.error.code||403==g.error.code&&"rateLimitExceeded"!=n)?403==g.error.code&&this.retryAuth||
-401==g.error.code&&this.retryAuth&&"authError"==n?(null!=c&&c(g),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=g&&null!=g.error&&412!=g.error.code&&404!=g.error.code&&400!=g.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=c&&c(g):c(g)}}}catch(u){if(null!=c)c(u);else throw u;}}))}catch(p){if(null!=c)c(p);else throw p;}});null!=this.token&&this.authCalled?l():this.execute(l)}catch(d){if(null!=
+b){var g;try{g=JSON.parse(d.getText())}catch(v){g=null}if(200<=d.getStatus()&&299>=d.getStatus())null!=e&&e(g);else{var m=null!=g&&null!=g.error?null!=g.error.data?g.error.data:g.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==c||null==g||null==g.error||-1!=g.error.code&&(403!=g.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=g.error.message)?null!=g&&null!=g.error&&(401==g.error.code||403==g.error.code&&"rateLimitExceeded"!=n)?403==g.error.code&&this.retryAuth||
+401==g.error.code&&this.retryAuth&&"authError"==n?(null!=c&&c(g),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=g&&null!=g.error&&412!=g.error.code&&404!=g.error.code&&400!=g.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=c&&c(g):c(g)}}}catch(v){if(null!=c)c(v);else throw v;}}))}catch(p){if(null!=c)c(p);else throw p;}});null!=this.token&&this.authCalled?l():this.execute(l)}catch(d){if(null!=
 c)c(d);else throw d;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
 DriveClient.prototype.authorize=function(a,e,c,b,k){var f=mxUtils.bind(this,function(a,b,d){this.token=a.access_token;a.expires=Date.now()+1E3*parseInt(a.expires_in);a.remember=b;this.resetTokenRefresh(a);this.authCalled=!0;if(d||null==this.user){var f=JSON.stringify(a);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(f);this.setPersistentToken(a,!b);null!=e&&e()}),c)}else null!=e&&(this.setPersistentToken(a,!b),e())});try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=
 this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));var l=JSON.parse(this.getPersistentToken(!0));null!=l&&(null==this.userId?null!=l.current?(this.userId=l.current.userId,l=l[this.userId]):l=null:l=l[this.userId]);if(!a||null!=l&&null!=l.refresh_token)if(a)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname)+"&refresh_token="+l.refresh_token,null,"GET")).send(mxUtils.bind(this,function(a){200<=
@@ -9619,24 +9620,24 @@ DriveClient.prototype.getLibrary=function(a,e,c){return this.getFile(a,e,c,!0,!0
 DriveClient.prototype.getFile=function(a,e,c,b,k){b=null!=b?b:!1;k=null!=k?k:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,e,c)}),c):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var f=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
 f?this.ui.convertFile(a.downloadUrl,a.title,a.mimeType,this.extension,e,c,null,{Authorization:"Bearer "+this.token}):b||k||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,e,c,!0,k):this.getXmlFile(a,e,c)}else c({message:mxResources.get("loggedOut")})}catch(d){if(null!=c)c(d);else throw d;}}),c)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
 DriveClient.prototype.getXmlFile=function(a,e,c,b,k){try{var f={Authorization:"Bearer "+this.token},l=a.downloadUrl;this.ui.editor.loadUrl(l,mxUtils.bind(this,function(b){try{if(null==b)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||k)a.mimeType!=this.libraryMimeType||k?e(new DriveLibrary(this.ui,b,a)):c({message:mxResources.get("notADiagramFile")});else{var d=!1;if(/\.png$/i.test(a.title)){var f=b.lastIndexOf(",");if(0<f){var n=this.ui.extractGraphModelFromPng(b.substring(f+
-1));if(null!=n&&0<n.length)b=n;else try{var n=b.substring(f+1),p=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n),v=this.ui.editor.extractGraphModel(mxUtils.parseXml(p).documentElement,!0);null==v||0<v.getElementsByTagName("parsererror").length?d=!0:b=p}catch(t){d=!0}}}else/\.pdf$/i.test(a.title)?(n=Editor.extractGraphModelFromPdf(b),null!=n&&0<n.length&&(d=!0,b=n)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(p=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(p):
+1));if(null!=n&&0<n.length)b=n;else try{var n=b.substring(f+1),p=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n),u=this.ui.editor.extractGraphModel(mxUtils.parseXml(p).documentElement,!0);null==u||0<u.getElementsByTagName("parsererror").length?d=!0:b=p}catch(t){d=!0}}}else/\.pdf$/i.test(a.title)?(n=Editor.extractGraphModelFromPdf(b),null!=n&&0<n.length&&(d=!0,b=n)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(p=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(p):
 Base64.decode(p));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,l)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?e(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(q){if(null!=c)c(q);else throw q;}}),a.title):e(d?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(t){if(null!=
 c)c(t);else throw t;}}),c,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(d){if(null!=c)c(d);else throw d;}};
 DriveClient.prototype.saveFile=function(a,e,c,b,k,f,l,d){try{var g=0;a.saveLevel=1;var m=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":
 "-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),n=mxUtils.bind(this,function(b){m(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nUserAgent="+navigator.userAgent+"\nAppVersion="+
 navigator.appVersion+"\nAppName="+navigator.appName+"\nPlatform="+navigator.platform+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+g+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(C){}});if(a.isEditable()&&null!=a.desc){var p=(new Date).getTime(),
-v=a.desc.etag,t=a.desc.modifiedDate,q=a.desc.headRevisionId,u=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var z=null,y=!1,A={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(A.mimeType))A.mimeType=this.xmlMimeType,z=a.desc,y=e=!0;else if("application/octet-stream"==A.mimeType||"1"==urlParams["override-mime"]&&A.mimeType!=this.xmlMimeType)A.mimeType=this.xmlMimeType;var x=mxUtils.bind(this,function(b,k,x){try{a.saveLevel=3;a.constructor==DriveFile&&
+u=a.desc.etag,t=a.desc.modifiedDate,q=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var z=null,y=!1,A={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(A.mimeType))A.mimeType=this.xmlMimeType,z=a.desc,y=e=!0;else if("application/octet-stream"==A.mimeType||"1"==urlParams["override-mime"]&&A.mimeType!=this.xmlMimeType)A.mimeType=this.xmlMimeType;var x=mxUtils.bind(this,function(b,k,x){try{a.saveLevel=3;a.constructor==DriveFile&&
 (null==d&&(d=[]),null==a.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:Editor.guid(32)}));x||(null!=b||f||(b=this.placeholderThumbnail,k=this.placeholderMimeType),null!=b&&null!=k&&(A.thumbnail={image:b,mimeType:k}));var B=a.getData(),C=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-p,a.saveLevel=11,null==b)m({message:mxResources.get("errorSavingFile")+": Empty response"});
-else{var d=(new Date(b.modifiedDate)).getTime()-(new Date(t)).getTime();if(0>=d||v==b.etag||e&&q==b.headRevisionId){a.saveLevel=12;var f=[];0>=d&&f.push("invalid modified time");v==b.etag&&f.push("stale etag");e&&q==b.headRevisionId&&f.push("stale revision");var g=f.join(", ");m({message:mxResources.get("errorSavingFile")+": "+g},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+q+"."+t+"-"+this.ui.hashValue(v)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
+else{var d=(new Date(b.modifiedDate)).getTime()-(new Date(t)).getTime();if(0>=d||u==b.etag||e&&q==b.headRevisionId){a.saveLevel=12;var f=[];0>=d&&f.push("invalid modified time");u==b.etag&&f.push("stale etag");e&&q==b.headRevisionId&&f.push("stale revision");var g=f.join(", ");m({message:mxResources.get("errorSavingFile")+": "+g},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+q+"."+t+"-"+this.ui.hashValue(u)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
 this.ui.hashValue(b.etag)+(0<g.length?"-errors-"+g:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(I){}}else if(a.saveLevel=null,c(b,B),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+
 "-CONVERT-FILE-"+a.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(I){}}}}catch(I){n(I)}}),D=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=d&&(A.properties=d);var k=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),x=mxUtils.bind(this,function(b){a.saveLevel=5;try{var d=a.desc.mimeType!=
 this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,x=null;try{x=window.setTimeout(mxUtils.bind(this,function(){l=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(S){}this.executeRequest(this.createUploadRequest(a.getId(),A,c,e||b||d,f,b?null:k,y),mxUtils.bind(this,function(a){window.clearTimeout(x);l&&C(a)}),mxUtils.bind(this,function(b){window.clearTimeout(x);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+
 a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==k)if(g<this.staleEtagMaxRetries){g++;var d=2*g*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",g,"delay",d)}else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+
 a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(Z){}}else"1"==urlParams.test&&c.headRevisionId==q&&EditorUi.debug("DriveClient: Remote Etag Changed","local",k,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),m(b,c)}catch(Z){n(Z)}}),
 mxUtils.bind(this,function(){m(b)})):m(b)}catch(V){n(V)}}}))}catch(S){n(S)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)x(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(W){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==
-q?("1"==urlParams.test&&k!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",k,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),k=e.etag,x(b)):m({error:{code:412}},e)}catch(S){n(S)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,m(b))}))}});if(u&&null==b){a.saveLevel=8;var B=new Image;B.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/B.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(B.height*
-a);b.getContext("2d").drawImage(B,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");A.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(W){try{p(!1)}catch(S){n(S)}}});B.src="data:image/png;base64,"+c}else p(!1)}catch(T){n(T)}});if(u){var J=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),m,this.ui.getCurrentFile()!=a?B:null,J.scale,J.border)}else D(B,!1)}catch(K){n(K)}});try{a.saveLevel=
-2,(f||u||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=A.mimeType&&"application/vnd.jgraph.mxfile"!=A.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){b=null}x(b,"image/png")}catch(D){n(D)}})))&&x(null,null,a.constructor!=DriveLibrary)}catch(B){n(B)}}else this.ui.editor.graph.reset(),
+q?("1"==urlParams.test&&k!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",k,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),k=e.etag,x(b)):m({error:{code:412}},e)}catch(S){n(S)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,m(b))}))}});if(v&&null==b){a.saveLevel=8;var B=new Image;B.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/B.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(B.height*
+a);b.getContext("2d").drawImage(B,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");A.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(W){try{p(!1)}catch(S){n(S)}}});B.src="data:image/png;base64,"+c}else p(!1)}catch(T){n(T)}});if(v){var J=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),m,this.ui.getCurrentFile()!=a?B:null,J.scale,J.border)}else D(B,!1)}catch(K){n(K)}});try{a.saveLevel=
+2,(f||v||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=A.mimeType&&"application/vnd.jgraph.mxfile"!=A.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){b=null}x(b,"image/png")}catch(D){n(D)}})))&&x(null,null,a.constructor!=DriveLibrary)}catch(B){n(B)}}else this.ui.editor.graph.reset(),
 m({message:mxResources.get("readOnly")})}catch(B){n(B)}};DriveClient.prototype.insertFile=function(a,e,c,b,k,f,l){f=null!=f?f:this.xmlMimeType;a={mimeType:f,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,e,!1,l),mxUtils.bind(this,function(a){f==this.libraryMimeType?b(new DriveLibrary(this.ui,e,a)):0==a?null!=k&&k({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,e,a))}),k)};
 DriveClient.prototype.createUploadRequest=function(a,e,c,b,k,f,l){k=null!=k?k:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(e)+
 "\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=c?k?c:Base64.encode(c):"")+"\r\n---------314159265358979323846--"};b||(a.fullUrl+="&newRevision=false");l&&(a.fullUrl+="&pinned=true");return a};
@@ -9675,7 +9676,7 @@ f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){
 DropboxClient.prototype.getFile=function(a,e,c,b){b=null!=b?b:!1;var k=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&k){var f=mxUtils.bind(this,function(){var b=a.split("/");this.ui.convertFile(a,0<b.length?b[b.length-1]:a,null,this.extension,e,c)});null!=this.token?f():this.authenticate(f,c)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(c,d){var f=
 k?c.lastIndexOf(","):-1,l=null;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+1)),null!=f&&0<f.length?c=f:l=new LocalFile(this,c,a,!0));e(null!=l?l:b?new DropboxLibrary(this.ui,c,d):new DropboxFile(this.ui,c,d))}),c,k)};
 DropboxClient.prototype.readFile=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});m.then(mxUtils.bind(this,function(a){}));m["catch"](function(a){window.clearTimeout(g);d&&null!=a&&409==a.status&&(d=!1,c({message:mxResources.get("fileNotFound")}))});m=this.client.filesDownload(a);m.then(mxUtils.bind(this,
-function(a){window.clearTimeout(g);if(d){d=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,function(b){e(f.result,a)});b?f.readAsDataURL(a.fileBlob):f.readAsText(a.fileBlob)}catch(v){c(v)}}}));m["catch"](mxUtils.bind(this,function(a){window.clearTimeout(g);d&&(d=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
+function(a){window.clearTimeout(g);if(d){d=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,function(b){e(f.result,a)});b?f.readAsDataURL(a.fileBlob):f.readAsText(a.fileBlob)}catch(u){c(u)}}}));m["catch"](mxUtils.bind(this,function(a){window.clearTimeout(g);d&&(d=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
 c)})}):this.authenticate(function(){k(!0)},c)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},c):f(!1)};
 DropboxClient.prototype.checkExists=function(a,e,c){var b=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(b,mxUtils.bind(this,function(b){c?e(!1,!0,b):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e(!0,!0,b)},function(){e(!1,!0,b)})}),function(a){e(!0,!1)})};
 DropboxClient.prototype.renameFile=function(a,e,c,b){if(/[\\\/:\?\*"\|]/.test(e))b({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=e){var k=a.stat.path_display.substring(1),f=k.lastIndexOf("/");0<f&&(e=k.substring(0,f+1)+e)}null!=a&&null!=e&&a.stat.path_lower.substring(1)!==e.toLowerCase()?this.checkExists(e,mxUtils.bind(this,function(f,d,g){f?(f=mxUtils.bind(this,function(d){d=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+e,autorename:!1});this.executePromise(d,
@@ -9699,7 +9700,7 @@ OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof Crypt
 OneDriveFile.prototype.doSave=function(a,e,c,b,k,f){var l=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=l;this.saveFile(a,e,c,b,k,f)}),b,k,f])};
 OneDriveFile.prototype.saveFile=function(a,e,c,b,k,f){if(!this.isEditable())null!=c&&c();else if(!this.savingFile)if(this.getTitle()==a){var l=mxUtils.bind(this,function(){var a=null,e=null;try{a=this.isModified;e=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}}),n=f||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),p=this.meta;
 k();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(d,e){this.isModified=a;this.savingFile=!1;this.meta=d;this.fileSaved(e,p,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c()}),b)}),mxUtils.bind(this,function(c,d){this.savingFile=!1;this.isModified=a;this.setModified(e||this.isModified());if(this.isConflict(d))this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.savingFileTime=new Date,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();l()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b();else if(null!=b){if(null!=c&&null!=c.retry){var f=c.retry;c.retry=function(){k();f()}}b(c)}}),n)}catch(v){if(this.savingFile=!1,null!=a&&(this.isModified=a),null!=e&&this.setModified(e||this.isModified()),null!=b)b(v);else throw v;}});l()}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=
+function(){this.updateFileData();l()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b();else if(null!=b){if(null!=c&&null!=c.retry){var f=c.retry;c.retry=function(){k();f()}}b(c)}}),n)}catch(u){if(this.savingFile=!1,null!=a&&(this.isModified=a),null!=e&&this.setModified(e||this.isModified()),null!=b)b(u);else throw u;}});l()}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=
 !1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))};OneDriveFile.prototype.rename=function(a,e,c){var b=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(k){this.hasSameExtension(a,this.getTitle())?(this.meta=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=e&&e(k)):(this.meta=k,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,e,c))}),c)};
 OneDriveFile.prototype.move=function(a,e,c){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=e&&e(a)}),c)};OneDriveLibrary=function(a,e,c){OneDriveFile.call(this,a,e,c)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(a,e,c){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.desc=a;null!=e&&e(a)}),c)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"oneDriveAuthInfo");a=JSON.parse(this.token);null!=a&&(this.token=a.access_token,this.endpointHint=null!=a.endpointHint?a.endpointHint.replace("/Documents","/_layouts/15/onedrive.aspx"):a.endpointHint,this.tokenExpiresOn=a.expiresOn,a=(this.tokenExpiresOn-Date.now())/1E3,this.resetTokenRefresh(600>a?1:a))};mxUtils.extend(OneDriveClient,DrawioClient);
 OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all offline_access";
@@ -9720,16 +9721,16 @@ c,k))}),c)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authentic
 OneDriveClient.prototype.getItemURL=function(a,e){var c=a.split("/");return 1<c.length?(e?"":this.baseUrl)+"/drives/"+c[0]+"/items/"+c[1]:(e?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,e,c){this.getFile(a,e,c,!1,!0)};
 OneDriveClient.prototype.getFile=function(a,e,c,b,k){k=null!=k?k:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),d=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||/\.pdf$/i.test(b.name)||!this.ui.useCanvasForExport&&d)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,e,c);else{var f=!0,m=window.setTimeout(mxUtils.bind(this,
 function(){f=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(m),f){var g=d?a.lastIndexOf(","):-1,l=null;if(0<g){var n=this.ui.extractGraphModelFromPng(a.substring(g+1));null!=n&&0<n.length?a=n:l=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var q=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q)}Graph.fileSupport&&
-(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),b.name):null!=l?e(l):k?e(new OneDriveLibrary(this.ui,a,b)):e(new OneDriveFile(this.ui,a,b))}}catch(u){if(null!=
-c)c(u);else throw u;}}),mxUtils.bind(this,function(a){window.clearTimeout(m);f&&c(this.parseRequestText(a))}),d||null!=b.file&&null!=b.file.mimeType&&("image/"==b.file.mimeType.substring(0,6)||"application/pdf"==b.file.mimeType))}}else c(this.parseRequestText(a))}),c)};
+(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),b.name):null!=l?e(l):k?e(new OneDriveLibrary(this.ui,a,b)):e(new OneDriveFile(this.ui,a,b))}}catch(v){if(null!=
+c)c(v);else throw v;}}),mxUtils.bind(this,function(a){window.clearTimeout(m);f&&c(this.parseRequestText(a))}),d||null!=b.file&&null!=b.file.mimeType&&("image/"==b.file.mimeType.substring(0,6)||"application/pdf"==b.file.mimeType))}}else c(this.parseRequestText(a))}),c)};
 OneDriveClient.prototype.renameFile=function(a,e,c,b){null!=a&&null!=e&&(this.isValidFilename(e)?this.checkExists(a.getParentId(),e,!1,mxUtils.bind(this,function(k){k?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:e}),"PATCH","application/json",c,b):b()})):b({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
 OneDriveClient.prototype.moveFile=function(a,e,c,b){e=this.getItemRef(e);var k=this.getItemRef(a);e.driveId!=k.driveId?b({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:e}),"PATCH","application/json",c,b)};OneDriveClient.prototype.insertLibrary=function(a,e,c,b,k){this.insertFile(a,e,c,b,!0,k)};
 OneDriveClient.prototype.insertFile=function(a,e,c,b,k,f){this.isValidFilename(a)?(k=null!=k?k:!1,this.checkExists(f,a,!0,mxUtils.bind(this,function(l){l?(l="/me/drive/root",null!=f&&(l=this.getItemURL(f,!0)),l=this.baseUrl+l+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(l,e,"PUT",null,mxUtils.bind(this,function(a){k?c(new OneDriveLibrary(this.ui,e,a)):c(new OneDriveFile(this.ui,e,a))}),b)):b()}))):b({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
 mxResources.get("oneDriveInvalidDeviceName")})};
 OneDriveClient.prototype.checkExists=function(a,e,c,b){var k="/me/drive/root";null!=a&&(k=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+k+"/children/"+encodeURIComponent(e),mxUtils.bind(this,function(a){404==a.getStatus()?b(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[e]),function(){b(!0)},function(){b(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)}))}),function(a){b(!1)},
 !0)};OneDriveClient.prototype.saveFile=function(a,e,c,b){try{var k=a.getData(),f=mxUtils.bind(this,function(d){var f=this.getItemURL(a.getId());this.writeFile(f+"/content/",d,"PUT",null,mxUtils.bind(this,function(a){e(a,k)}),c,b)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)){var l=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=a?k:null,l.scale,l.border)}else f(k)}catch(d){c(d)}};
-OneDriveClient.prototype.writeFile=function(a,e,c,b,k,f,l){try{if(null!=a&&null!=e)if(4E6<=e.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 4 MB)"});else{var d=mxUtils.bind(this,function(g){try{var m=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){m=!1;f({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout)}catch(v){}var p=new mxXmlRequest(a,e,c);p.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");
-a.setRequestHeader("Authorization","Bearer "+this.token);null!=l&&a.setRequestHeader("If-Match",l)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(JSON.parse(a.getText()))):g||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){d(!0)},f,g))}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&f(this.parseRequestText(a))}))}catch(v){f(v)}});null==
+OneDriveClient.prototype.writeFile=function(a,e,c,b,k,f,l){try{if(null!=a&&null!=e)if(4E6<=e.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 4 MB)"});else{var d=mxUtils.bind(this,function(g){try{var m=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){m=!1;f({code:App.ERROR_TIMEOUT,retry:d})}),this.ui.timeout)}catch(u){}var p=new mxXmlRequest(a,e,c);p.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");
+a.setRequestHeader("Authorization","Bearer "+this.token);null!=l&&a.setRequestHeader("If-Match",l)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(JSON.parse(a.getText()))):g||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){d(!0)},f,g))}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&f(this.parseRequestText(a))}))}catch(u){f(u)}});null==
 this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){d(!0)},f):d(!1)}else f({message:mxResources.get("unknownError")})}catch(g){f(g)}};OneDriveClient.prototype.parseRequestText=function(a){var e={message:mxResources.get("unknownError")};try{e=JSON.parse(a.getText())}catch(c){}return e};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(e){a(e)})};
 OneDriveClient.prototype.pickFolder=function(a,e){var c=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
 error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){c(!1)}),this.emptyFn):c(e)};
@@ -9749,15 +9750,15 @@ GitHubClient.prototype.authenticate=function(a,e){if(null==window.onGitHubCallba
 !0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+l,mxUtils.bind(this,function(g){window.clearTimeout(c);if(b)try{if(200>g.getStatus()||300<=g.getStatus())e({message:mxResources.get("cannotLogin")});else{null!=f&&f();var l=g.getText();this.token=l.substring(l.indexOf("=")+1,l.indexOf("&"));this.setUser(null);k&&this.setPersistentToken(this.token);a()}}catch(t){e(t)}finally{null!=d&&
 d.close()}}))});g()}else null!=d&&d.close()}):e({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,e({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else e({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,e){try{var c=JSON.parse(a.getText());null!=c&&null!=c.message&&(e=c.message)}catch(b){}return e};
 GitHubClient.prototype.executeRequest=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),m=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(g);if(d)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())e(a);else if(401===a.getStatus())l?c({code:a.getStatus(),
-message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(v){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?
+message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?
 c({code:a.getStatus(),status:409}):c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),c)}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};GitHubClient.prototype.getLibrary=function(a,e,c){this.getFile(a,e,c,!0)};
 GitHubClient.prototype.getSha=function(a,e,c,b,k,f){var l="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+e+"/contents/"+c+"?ref="+b+l,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{k(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){f(g)}}),f)};
 GitHubClient.prototype.getFile=function(a,e,c,b,k){b=null!=b?b:!1;var f=a.split("/"),l=f[0],d=f[1],g=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);if(!k&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&f))if(null!=this.token){k=this.baseUrl+"/repos/"+l+"/"+d+"/contents/"+a+"?ref="+g;var m={Authorization:"token "+this.token},f=a.split("/");this.ui.convertFile(k,0<f.length?f[f.length-1]:a,null,this.extension,e,c,null,m)}else c({message:mxResources.get("accessDenied")});
 else f="&t="+(new Date).getTime(),a=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+d+"/contents/"+a+"?ref="+g+f,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{e(this.createGitHubFile(l,d,g,JSON.parse(a.getText()),b))}catch(p){c(p)}}),c)};
 GitHubClient.prototype.createGitHubFile=function(a,e,c,b,k){a={org:a,repo:e,ref:c,name:b.name,path:b.path,sha:b.sha,html_url:b.html_url,download_url:b.download_url};e=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(b.name)?e="data:image/jpeg;base64,"+e:/\.gif$/i.test(b.name)?e="data:image/gif;base64,"+e:/\.png$/i.test(b.name)?(b=this.ui.extractGraphModelFromPng(e),e=null!=b&&0<b.length?b:"data:image/png;base64,"+e):e=Base64.decode(e));return k?new GitHubLibrary(this.ui,e,a):new GitHubFile(this.ui,
 e,a)};GitHubClient.prototype.insertLibrary=function(a,e,c,b,k){this.insertFile(a,e,c,b,!0,k,!1)};
-GitHubClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");var d=f[0],g=f[1],m=f[2],n=f.slice(3,f.length).join("/");0<n.length&&(n+="/");n+=a;this.checkExists(d+"/"+g+"/"+m+"/"+n,!0,mxUtils.bind(this,function(f,v){f?k?(l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(d,g,m,n,a,e,v,mxUtils.bind(this,function(a){try{var e=JSON.parse(a.getText());c(this.createGitHubFile(d,g,m,e.content,k))}catch(z){b(z)}}),b)}),b)):c(new GitHubFile(this.ui,
-e,{org:d,repo:g,ref:m,name:a,path:n,sha:v,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,e,c,b){var k=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(e?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){k();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
+GitHubClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");var d=f[0],g=f[1],m=f[2],n=f.slice(3,f.length).join("/");0<n.length&&(n+="/");n+=a;this.checkExists(d+"/"+g+"/"+m+"/"+n,!0,mxUtils.bind(this,function(f,u){f?k?(l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(d,g,m,n,a,e,u,mxUtils.bind(this,function(a){try{var e=JSON.parse(a.getText());c(this.createGitHubFile(d,g,m,e.content,k))}catch(z){b(z)}}),b)}),b)):c(new GitHubFile(this.ui,
+e,{org:d,repo:g,ref:m,name:a,path:n,sha:u,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,e,c,b){var k=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(e?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){k();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
 GitHubClient.prototype.writeFile=function(a,e,c,b,k,f,l,d,g){f.length>=this.maxFileSize?g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(c={path:b,branch:decodeURIComponent(c),message:k,content:f},null!=l&&(c.sha=l),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+e+"/contents/"+b,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
 this.clientId,a.code=null);g(a)})))};
 GitHubClient.prototype.checkExists=function(a,e,c){var b=a.split("/"),k=b[0],f=b[1],l=b[2];a=b.slice(3,b.length).join("/");this.getSha(k,f,a,l,mxUtils.bind(this,function(b){if(e){var d=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){d();c(!0,b)},function(){d();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)};
@@ -9765,18 +9766,18 @@ GitHubClient.prototype.saveFile=function(a,e,c,b,k){var f=a.meta.org,l=a.meta.re
 b)}),c,this.ui.getCurrentFile()!=a?a.getData():null,b.scale,b.border)}else m(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(f,l,g,d,mxUtils.bind(this,function(b){a.meta.sha=b;n()}),c):n()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
 GitHubClient.prototype.showGitHubDialog=function(a,e){var c=null,b=null,k=null,f=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.height="304px";var d=document.createElement("h3");mxUtils.write(d,mxResources.get(a?"selectFile":"selectFolder"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.border="1px solid lightgray";g.style.boxSizing=
 "border-box";g.style.padding="4px";g.style.overflow="auto";g.style.lineHeight="1.2em";g.style.height="274px";l.appendChild(g);var m=document.createElement("div");m.style.textOverflow="ellipsis";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.padding="4px";m.style.width="100%";var n=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+f)}));this.ui.showDialog(n.container,420,360,!0,!0);a&&n.okButton.parentNode.removeChild(n.okButton);var p=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),v=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,
-function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}g.appendChild(d)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,u=null,z=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
-"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(k)+"&per_page=100&page="+d,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=u&&(mxEvent.removeListener(g,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){z(d+1)});mxEvent.addListener(q,
-"click",x);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(v(),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var x=JSON.parse(l.getText());if(null==x||0==x.length)mxUtils.write(g,mxResources.get("noFiles"));else{var n=!0,B=0;l=mxUtils.bind(this,function(d){for(var l=0;l<x.length;l++)mxUtils.bind(this,function(l,x){if(d==("dir"==l.type)){var u=m.cloneNode();u.style.backgroundColor=
-n?"#eeeeee":"";n=!n;var q=document.createElement("img");q.src=IMAGE_PATH+"/"+("dir"==l.type?"folder.png":"file.png");q.setAttribute("align","absmiddle");q.style.marginRight="4px";q.style.marginTop="-4px";q.width=20;u.appendChild(q);u.appendChild(p(l.name+("dir"==l.type?"/":""),mxUtils.bind(this,function(){"dir"==l.type?(f=l.path,z()):a&&"file"==l.type&&(this.ui.hideDialog(),e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+l.path))})));g.appendChild(u);B++}})(x[l],l)});l(!0);a&&l(!1)}}),t,!0)}),y=mxUtils.bind(this,
-function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=u&&(mxEvent.removeListener(g,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var e=
-mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(v(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){k=
-a.name;f="";z()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),u=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",u))}}),t)}),A=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=u&&mxEvent.removeListener(g,"scroll",u);null!=q&&null!=q.parentNode&&
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),u=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,
+function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}g.appendChild(d)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,v=null,z=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
+"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(k)+"&per_page=100&page="+d,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){z(d+1)});mxEvent.addListener(q,
+"click",x);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(u(),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var x=JSON.parse(l.getText());if(null==x||0==x.length)mxUtils.write(g,mxResources.get("noFiles"));else{var n=!0,B=0;l=mxUtils.bind(this,function(d){for(var l=0;l<x.length;l++)mxUtils.bind(this,function(l,x){if(d==("dir"==l.type)){var v=m.cloneNode();v.style.backgroundColor=
+n?"#eeeeee":"";n=!n;var q=document.createElement("img");q.src=IMAGE_PATH+"/"+("dir"==l.type?"folder.png":"file.png");q.setAttribute("align","absmiddle");q.style.marginRight="4px";q.style.marginTop="-4px";q.width=20;v.appendChild(q);v.appendChild(p(l.name+("dir"==l.type?"/":""),mxUtils.bind(this,function(){"dir"==l.type?(f=l.path,z()):a&&"file"==l.type&&(this.ui.hideDialog(),e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+l.path))})));g.appendChild(v);B++}})(x[l],l)});l(!0);a&&l(!1)}}),t,!0)}),y=mxUtils.bind(this,
+function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var e=
+mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){k=
+a.name;f="";z()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}}),t)}),A=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&mxEvent.removeListener(g,"scroll",v);null!=q&&null!=q.parentNode&&
 q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(g,mxResources.get("noFiles"));else{1==a&&(g.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,
 function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=k=null,y()):this.ui.spinner.spin(g,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;k=decodeURIComponent(a.meta.ref);f="";z()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
 this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(g),mxUtils.br(g));for(var l=0;l<d.length;l++)mxUtils.bind(this,function(a,d){var e=m.cloneNode();e.style.backgroundColor=0==d%2?"#eeeeee":"";e.appendChild(p(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;b=a.name;k=a.default_branch;
-f="";z()})));g.appendChild(e)})(d[l],l)}100==d.length&&(g.appendChild(q),u=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",u))}),t)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,e,c){DrawioFile.call(this,a,e);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+f="";z()})));g.appendChild(e)})(d[l],l)}100==d.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}),t)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,e,c){DrawioFile.call(this,a,e);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
 TrelloFile.prototype.save=function(a,e,c){this.doSave(this.getTitle(),e,c)};TrelloFile.prototype.saveAs=function(a,e,c){this.doSave(a,e,c)};TrelloFile.prototype.doSave=function(a,e,c){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=b;this.saveFile(a,!1,e,c)};
 TrelloFile.prototype.saveFile=function(a,e,c,b){if(this.isEditable())if(this.savingFile)null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,this.getTitle()==a){var k=this.isModified,f=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});l();this.ui.trello.saveFile(this,mxUtils.bind(this,function(d){this.savingFile=!1;this.isModified=k;this.meta=d;this.contentChanged();null!=c&&
 c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,e,c,b))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=k;this.setModified(f||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){l();c()}}b(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(d){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(d){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(d);0<this.saveNeededCounter&&
@@ -9795,25 +9796,25 @@ TrelloClient.prototype.showTrelloDialog=function(a,e){var c=null,b="@me",k=0,f=d
 "194px";f.appendChild(d);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var g=mxUtils.bind(this,function(a,b,c){k++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==k%2?"#eee":"#fff");var e=document.createElement("a");e.setAttribute("href","javascript:void(0);");if(null!=c){var f=document.createElement("img");f.src=c.url;f.width=c.width;f.height=
 c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),m=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),n=mxUtils.bind(this,function(){k=0;d.innerHTML="";this.ui.spinner.spin(d,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+"/attachments",{fields:"id,name,previews"},
 mxUtils.bind(this,function(a){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){t()})));mxUtils.br(d);null==a||0==a.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){d.appendChild(g(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,m,!0):
-null!=m&&m(b)}))});a()}),p=null,v=null,t=mxUtils.bind(this,function(f){null==f&&(k=0,d.innerHTML="",f=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",v);t(f+1)});mxEvent.addListener(p,"click",l);var q=mxUtils.bind(this,function(){Trello.get("search",
+null!=m&&m(b)}))});a()}),p=null,u=null,t=mxUtils.bind(this,function(f){null==f&&(k=0,d.innerHTML="",f=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",u);t(f+1)});mxEvent.addListener(p,"click",l);var q=mxUtils.bind(this,function(){Trello.get("search",
 {query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(k){this.ui.spinner.stop();k=null!=k?k.cards:null;if(null==k||0==k.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==f&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,t())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(d));for(var m=0;m<k.length;m++)mxUtils.bind(this,function(b){d.appendChild(g(b.name,mxUtils.bind(this,function(){a?(c=b.id,n()):(this.ui.hideDialog(),e(b.id))})))})(k[m]);100==k.length&&(d.appendChild(p),v=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&l()},mxEvent.addListener(d,"scroll",v))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,m,!0):null!=m&&m({message:a.responseText})}))});q()});t()};
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(d));for(var m=0;m<k.length;m++)mxUtils.bind(this,function(b){d.appendChild(g(b.name,mxUtils.bind(this,function(){a?(c=b.id,n()):(this.ui.hideDialog(),e(b.id))})))})(k[m]);100==k.length&&(d.appendChild(p),u=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&l()},mxEvent.addListener(d,"scroll",u))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,m,!0):null!=m&&m({message:a.responseText})}))});q()});t()};
 TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,e,c){GitHubFile.call(this,a,e,c);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(a){return null!=a&&400==a.status};
 GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(a,e){a.last_commit_id=e};GitLabLibrary=function(a,e,c){GitLabFile.call(this,a,e,c)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,e,c){this.saveFile(a,!1,e,c)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.authToken="Bearer";
 GitLabClient.prototype.authenticate=function(a,e){if(null==window.onGitLabCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(k,f){var l=window.location.href,l=l.substring(0,l.lastIndexOf("/")),l=encodeURIComponent(l+"/gitlab.html");null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+l+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,
 function(d,g){b?(window.onGitLabCallback=null,b=!1,null==d?e({message:mxResources.get("accessDenied"),retry:c}):(null!=f&&f(),this.token=d,this.setUser(null),k&&this.setPersistentToken(this.token),a())):null!=g&&g.close()}):e({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitLabCallback=null,b=!1,e({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else e({code:App.ERROR_BUSY})};
 GitLabClient.prototype.executeRequest=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),m=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",m);a.setRequestHeader("PRIVATE_TOKEN",m);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(g);if(d)if(200<=
-a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())e(a);else if(401===a.getStatus())l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(v){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:this.getErrorMessage(a,
+a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())e(a);else if(401===a.getStatus())l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:this.getErrorMessage(a,
 mxResources.get("fileNotFound"))}):400===a.getStatus()?c({status:400}):c({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),c)}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};
-GitLabClient.prototype.getRefIndex=function(a,e,c,b,k){if(null!=k)c(a,k);else{var f=a.length-2,l=mxUtils.bind(this,function(){if(2>f)b({message:mxResources.get("fileNotFound")});else{var d=Math.max(f-1,0),g=a.slice(0,d).join("/"),d=a[d],k=a[f],n=a.slice(f+1,a.length).join("/"),g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+d)+"/repository/"+(e?"tree?path="+n+"&ref="+k:"files/"+encodeURIComponent(n)+"?ref="+k),p=new mxXmlRequest(g,null,"HEAD");this.executeRequest(p,mxUtils.bind(this,function(){200==
-p.getStatus()?c(a,f):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==p.getStatus()?(f--,l()):b({message:mxResources.get("fileNotFound")})}))}});l()}};
-GitLabClient.prototype.getFile=function(a,e,c,b,k,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,d){var g=Math.max(d-1,0),l=f.slice(0,g).join("/"),n=f[g],p=f[d];a=f.slice(d+1,f.length).join("/");g=/\.png$/i.test(a);if(!k&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&g))if(null!=this.token){var g="&t="+(new Date).getTime(),v=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+
-"?ref="+p;f=a.split("/");this.ui.convertFile(v+g,0<f.length?f[f.length-1]:a,null,this.extension,e,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(y){c(y)}}),c)}))}else c({message:mxResources.get("accessDenied")});else g="&t="+(new Date).getTime(),v=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+"?ref="+p,g=new mxXmlRequest(v+
+GitLabClient.prototype.getRefIndex=function(a,e,c,b,k,f){if(null!=k)c(a,k);else{var l=a.length-2,d=mxUtils.bind(this,function(){if(2>l)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(l-1,0),k=a.slice(0,g).join("/"),g=a[g],n=a[l],p=a.slice(l+1,a.length).join("/"),k=this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+g)+"/repository/"+(e?f?"branches?per_page=1&page=1&ref="+n:"tree?path="+p+"&ref="+n:"files/"+encodeURIComponent(p)+"?ref="+n),u=new mxXmlRequest(k,null,"HEAD");this.executeRequest(u,
+mxUtils.bind(this,function(){200==u.getStatus()?c(a,l):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==u.getStatus()?(l--,d()):b({message:mxResources.get("fileNotFound")})}))}});d()}};
+GitLabClient.prototype.getFile=function(a,e,c,b,k,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,d){var g=Math.max(d-1,0),l=f.slice(0,g).join("/"),n=f[g],p=f[d];a=f.slice(d+1,f.length).join("/");g=/\.png$/i.test(a);if(!k&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&g))if(null!=this.token){var g="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+
+"?ref="+p;f=a.split("/");this.ui.convertFile(u+g,0<f.length?f[f.length-1]:a,null,this.extension,e,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(y){c(y)}}),c)}))}else c({message:mxResources.get("accessDenied")});else g="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+"?ref="+p,g=new mxXmlRequest(u+
 g,null,"GET"),this.executeRequest(g,mxUtils.bind(this,function(a){try{e(this.createGitLabFile(l,n,p,JSON.parse(a.getText()),b,d))}catch(q){c(q)}}),c)}),c,f)};
 GitLabClient.prototype.getFileContent=function(a){var e=a.file_name,c=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(e)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(e)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(e)?c="data:application/pdf;base64,"+c:/\.png$/i.test(e)?(a=this.ui.extractGraphModelFromPng(c),c=null!=a&&0<a.length?a:"data:image/png;base64,"+c):c=Base64.decode(c));return c};
 GitLabClient.prototype.createGitLabFile=function(a,e,c,b,k,f){var l=DRAWIO_GITLAB_URL+"/";a={org:a,repo:e,ref:c,name:b.file_name,path:b.file_path,html_url:l+a+"/"+e+"/blob/"+c+"/"+b.file_path,download_url:l+a+"/"+e+"/raw/"+c+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:f};b=this.getFileContent(b);return k?new GitLabLibrary(this.ui,b,a):new GitLabFile(this.ui,b,a)};
-GitLabClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;this.getRefIndex(f.split("/"),!0,mxUtils.bind(this,function(d,f){var g=Math.max(f-1,0),n=d.slice(0,g).join("/"),p=d[g],v=d[f];path=d.slice(f+1,d.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(n+"/"+p+"/"+v+"/"+path,!0,mxUtils.bind(this,function(d,g){if(d)if(k)l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,p,v,path,a,e,g,mxUtils.bind(this,function(a){try{var d=
-JSON.parse(a.getText());c(this.createGitLabFile(n,p,v,d.content,k,f))}catch(x){b(x)}}),b)}),b);else{var m=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,e,{org:n,repo:p,ref:v,name:a,path:path,html_url:m+n+"/"+p+"/blob/"+v+"/"+path,download_url:m+n+"/"+p+"/raw/"+v+"/"+path+"?inline=false",refPos:f,last_commit_id:g,isNew:!0}))}else b()}))}),b)};
+GitLabClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");this.getRefIndex(f,!0,mxUtils.bind(this,function(d,f){var g=Math.max(f-1,0),n=d.slice(0,g).join("/"),p=d[g],u=d[f];path=d.slice(f+1,d.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(n+"/"+p+"/"+u+"/"+path,!0,mxUtils.bind(this,function(d,g){if(d)if(k)l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,p,u,path,a,e,g,mxUtils.bind(this,function(a){try{var d=
+JSON.parse(a.getText());c(this.createGitLabFile(n,p,u,d.content,k,f))}catch(x){b(x)}}),b)}),b);else{var m=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,e,{org:n,repo:p,ref:u,name:a,path:path,html_url:m+n+"/"+p+"/blob/"+u+"/"+path,download_url:m+n+"/"+p+"/raw/"+u+"/"+path+"?inline=false",refPos:f,last_commit_id:g,isNew:!0}))}else b()}))}),b,null,4>=f.length)};
 GitLabClient.prototype.checkExists=function(a,e,c){this.getFile(a,mxUtils.bind(this,function(b){if(e){var k=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){k();c(!0,b.getCurrentEtag())},function(){k();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)};
 GitLabClient.prototype.writeFile=function(a,e,c,b,k,f,l,d,g){if(f.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"});else{var m="POST";c={path:encodeURIComponent(b),branch:decodeURIComponent(c),commit_message:k,content:f,encoding:"base64"};null!=l&&(c.last_commit_id=l,m="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+e)+"/repository/files/"+encodeURIComponent(b);m=new mxXmlRequest(a,JSON.stringify(c),m);this.executeRequest(m,
 mxUtils.bind(this,function(a){d(a)}),g)}};
@@ -9822,20 +9823,20 @@ this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.last_commit_id,b)}
 GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
 GitLabClient.prototype.showGitLabDialog=function(a,e){var c=null,b=null,k=null,f=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.height="304px";var d=document.createElement("h3");mxUtils.write(d,mxResources.get(a?"selectFile":"selectFolder"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.border="1px solid lightgray";g.style.boxSizing=
 "border-box";g.style.padding="4px";g.style.overflow="auto";g.style.lineHeight="1.2em";g.style.height="274px";l.appendChild(g);var m=document.createElement("div");m.style.textOverflow="ellipsis";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.padding="4px";m.style.width="100%";var n=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+f)}));this.ui.showDialog(n.container,420,360,!0,!0);a&&n.okButton.parentNode.removeChild(n.okButton);var p=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),v=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,
-function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}g.appendChild(d)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,u=null,z=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
-"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+k+"&per_page=100&page="+d,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=u&&(mxEvent.removeListener(g,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){z(d+
-1)});mxEvent.addListener(q,"click",x);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(v(!k),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(g,mxResources.get("noFiles"));else{var B=!0,t=0;l=mxUtils.bind(this,function(d){for(var l=0;l<n.length;l++)mxUtils.bind(this,function(l){if(d==("tree"==l.type)){var n=
+mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),u=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,
+function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}g.appendChild(d)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,v=null,z=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+k+"&per_page=100&page="+d,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){z(d+
+1)});mxEvent.addListener(q,"click",x);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(u(!k),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(g,mxResources.get("noFiles"));else{var B=!0,t=0;l=mxUtils.bind(this,function(d){for(var l=0;l<n.length;l++)mxUtils.bind(this,function(l){if(d==("tree"==l.type)){var n=
 m.cloneNode();n.style.backgroundColor=B?"#eeeeee":"";B=!B;var x=document.createElement("img");x.src=IMAGE_PATH+"/"+("tree"==l.type?"folder.png":"file.png");x.setAttribute("align","absmiddle");x.style.marginRight="4px";x.style.marginTop="-4px";x.width=20;n.appendChild(x);n.appendChild(p(l.name+("tree"==l.type?"/":""),mxUtils.bind(this,function(){"tree"==l.type?(f=l.path,z()):a&&"blob"==l.type&&(this.ui.hideDialog(),e(c+"/"+b+"/"+k+"/"+l.path))})));g.appendChild(n);t++}})(n[l])});l(!0);a&&l(!1);100==
-t&&(g.appendChild(q),u=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&x()},mxEvent.addListener(g,"scroll",u))}}),t,!0)}),y=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=u&&(mxEvent.removeListener(g,"scroll",u),u=null);null!=q&&null!=q.parentNode&&
-q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(v(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));
-else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){k=encodeURIComponent(a.name);f="";z()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),u=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",u))}}),t)});n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));var A=mxUtils.bind(this,
-function(a){this.ui.spinner.stop();null==a&&(g.innerHTML="",a=1);null!=u&&(mxEvent.removeListener(g,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(g,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
+t&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&x()},mxEvent.addListener(g,"scroll",v))}}),t,!0)}),y=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&
+q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));
+else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){k=encodeURIComponent(a.name);f="";z()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}}),t)});n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));var A=mxUtils.bind(this,
+function(a){this.ui.spinner.stop();null==a&&(g.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(g,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(g,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
 "/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),t)}),l=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(g,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),t)});e(mxUtils.bind(this,function(e){var n=new mxXmlRequest(this.baseUrl+"/users/"+
 this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=e&&0!=e.length){1==a&&(g.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(c=a[0],b=a[1],k="master",
 f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,a.length).join("/"))),z()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(g),mxUtils.br(g));for(var x=!0,B=0;B<n.length;B++)mxUtils.bind(this,function(a,d){var e=m.cloneNode();e.style.backgroundColor=x?"#eeeeee":"";x=!x;e.appendChild(p(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b=
 a.path;k=a.default_branch||"master";f="";z()})));g.appendChild(e)})(n[B],B);for(B=0;B<e.length;B++)l(e[B],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var l=m.cloneNode();l.style.backgroundColor=x?"#eeeeee":"";x=!x;mxUtils.bind(this,function(d){l.appendChild(p(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;k=d.default_branch||"master";f="";z()})));g.appendChild(l)})(d[e])}}))}else mxUtils.write(g,mxResources.get("noFiles"));100==n.length&&(g.appendChild(q),
-u=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&d()},mxEvent.addListener(g,"scroll",u))}),t)}))});this.token?this.user?A():this.updateUser(function(){A()},t,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},t,!0)}),t)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,e,c,b,k,f,l){this.file=a;this.id=e;this.content=c;this.modifiedDate=b;this.createdDate=k;this.isResolved=f;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,e,c,b,k){e()};DrawioComment.prototype.editComment=function(a,e,c){e()};DrawioComment.prototype.deleteComment=function(a,e){a()};DriveComment=function(a,e,c,b,k,f,l,d){DrawioComment.call(this,a,e,c,b,k,f,l);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,e,c,b,k){a={content:a.content};b?a.verb="resolve":k&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){e(a.replyId)}),c)};
+v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&d()},mxEvent.addListener(g,"scroll",v))}),t)}))});this.token?this.user?A():this.updateUser(function(){A()},t,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},t,!0)}),t)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,e,c,b,k,f,l){this.file=a;this.id=e;this.content=c;this.modifiedDate=b;this.createdDate=k;this.isResolved=f;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,e,c,b,k){e()};DrawioComment.prototype.editComment=function(a,e,c){e()};DrawioComment.prototype.deleteComment=function(a,e){a()};DriveComment=function(a,e,c,b,k,f,l,d){DrawioComment.call(this,a,e,c,b,k,f,l);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,e,c,b,k){a={content:a.content};b?a.verb="resolve":k&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){e(a.replyId)}),c)};
 DriveComment.prototype.editComment=function(a,e,c){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},e,c)};
 DriveComment.prototype.deleteComment=function(a,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,e)};App=function(a,e,c){EditorUi.call(this,a,e,null!=c?c:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
 a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
@@ -9865,7 +9866,7 @@ mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),window.addEventL
 urlParams.offline){k=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var f=JSON.parse(localStorage.getItem(mxSettings.key));null!=f&&(k=f.plugins)}catch(n){}f=urlParams.p;App.initPluginCallback();null!=f&&App.loadPlugins(f.split(";"));if(null!=k&&0<k.length&&"0"!=urlParams.plugins){for(var f=window.location.protocol+"//"+window.location.host,l=!0,d=0;d<k.length&&l;d++)"/"!=k[d].charAt(0)&&k[d].substring(0,f.length)!=
 f&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[k.join("\n")]).replace(/\\n/g,"\n")))for(d=0;d<k.length;d++)try{null==App.pluginsLoaded[k[d]]&&(App.pluginsLoaded[k[d]]=!0,App.embedModePluginsCount++,"/"==k[d].charAt(0)&&(k[d]=PLUGINS_BASE_PATH+k[d]),mxscript(k[d]))}catch(n){}}}"function"===
 typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var g=window.opener||window.parent,m=
-function(a){if(a.source==g)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(v){null!=window.console&&console.log("Error in configure message: "+v,a.data)}};mxEvent.addListener(window,"message",m);g.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
+function(a){if(a.source==g)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(u){null!=window.console&&console.log("Error in configure message: "+u,a.data)}};mxEvent.addListener(window,"message",m);g.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
 mxSettings.load()}catch(n){null!=window.console&&console.error(n)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(k=localStorage.getItem(".configuration"),null!=k))try{k=JSON.parse(k),null!=k&&(EditorUi.debug("Using local configuration",k),Editor.configure(k),mxSettings.load())}catch(n){null!=window.console&&console.error(n)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";
 App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
 App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
@@ -9906,8 +9907,8 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
 App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){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&&(document.title=a,a=this.editor.graph,a.invalidateDescendantsWithPlaceholders(a.model.getRoot()),a.view.validate())}};
 App.prototype.getThumbnail=function(a,e){var c=!1;try{var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;e(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(k);b&&e(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var l=this.editor.graph,d=null!=l.themes&&"darkTheme"==l.defaultThemeName;if(d||null!=this.pages&&this.currentPage!=this.pages[0]){var g=l.getGlobalVariable,l=this.createTemporaryGraph(d?l.getDefaultStylesheet():l.getStylesheet()),m=this.pages[0];
 d&&(l.defaultThemeName="default");l.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:g.apply(this,arguments)};l.getGlobalVariable=g;document.body.appendChild(l.container);l.model.setRoot(m.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(a){try{l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}catch(C){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},
-null,null,null,null,null,null,l),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),p=l.getGraphBounds(),v=a/p.width,v=Math.min(1,Math.min(3*a/(4*p.height),v)),t=Math.floor(p.x),q=Math.floor(p.y);n.setAttribute("width",Math.ceil(v*(p.width+4)));n.setAttribute("height",Math.ceil(v*(p.height+4)));var u=n.getContext("2d");u.scale(v,v);u.translate(-t,-q);var z=l.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";u.save();u.fillStyle=z;u.fillRect(t,
-q,Math.ceil(p.width+4),Math.ceil(p.height+4));u.restore();var y=new mxJsCanvas(n),A=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var x=new mxImageExport;x.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())};x.drawText=function(a,b){};x.drawState(l.getView().getState(l.model.root),A);A.finish(mxUtils.bind(this,function(){try{x.drawState(l.getView().getState(l.model.root),
+null,null,null,null,null,null,l),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),p=l.getGraphBounds(),u=a/p.width,u=Math.min(1,Math.min(3*a/(4*p.height),u)),t=Math.floor(p.x),q=Math.floor(p.y);n.setAttribute("width",Math.ceil(u*(p.width+4)));n.setAttribute("height",Math.ceil(u*(p.height+4)));var v=n.getContext("2d");v.scale(u,u);v.translate(-t,-q);var z=l.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";v.save();v.fillStyle=z;v.fillRect(t,
+q,Math.ceil(p.width+4),Math.ceil(p.height+4));v.restore();var y=new mxJsCanvas(n),A=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var x=new mxImageExport;x.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())};x.drawText=function(a,b){};x.drawState(l.getView().getState(l.model.root),A);A.finish(mxUtils.bind(this,function(){try{x.drawState(l.getView().getState(l.model.root),
 y),l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}catch(B){n=null}f(n)}));c=!0}}catch(B){c=!1,null!=l&&l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}return c};
 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(e,c){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();e=null!=b?b.getMode():e;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")])),
@@ -9964,13 +9965,13 @@ App.prototype.saveFile=function(a,e){var c=this.getCurrentFile();if(null!=c){var
 d=this.getServiceCount(!0);isLocalStorage&&d++;var g=4>=d?2:6<d?4:3,k=new CreateDialog(this,k,mxUtils.bind(this,function(a,c,d){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){d.value=a.split(".").slice(0,-1).join(".");d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",
 !1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==l&&c==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,b)):"download"==c?(new LocalFile(this,null,a)).save():"_blank"==c?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):l!=c?this.pickFolder(c,mxUtils.bind(this,function(d){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||
 /(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,c,b,null==this.mode,d)})):null!=c&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,f,null,!0,g,null,null,null,this.editor.fileExtensions,!1);this.showDialog(k.container,400,d>g?390:270,!0,!0);k.init()}else this.save(c.getTitle(),b)}};
-App.prototype.loadTemplate=function(a,e,c,b){var k=!1,f=a;this.editor.isCorsEnabledForUrl(f)||(f="t="+(new Date).getTime(),f=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+f,k=!0);var l=null!=b?b:a;this.editor.loadUrl(f,mxUtils.bind(this,function(b){try{var d=k?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b;if(/(\.v(dx|sdx?))($|\?)/i.test(l)||this.isVisioData(d))this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){e(a)},c,l);else if(!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,l))this.parseFile(new Blob([d],{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);else if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){c(a)}));else{if(/(\.png)($|\?)/i.test(l)||this.isPngData(d))d=this.extractGraphModelFromPng(b);e(d)}}catch(m){c(m)}}),
-c,/(\.png)($|\?)/i.test(l)||/(\.v(dx|sdx?))($|\?)/i.test(l),null,null,k)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
+App.prototype.loadTemplate=function(a,e,c,b,k){var f=!1,l=a;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+l,f=!0);var d=null!=b?b:a;this.editor.loadUrl(l,mxUtils.bind(this,function(b){try{var g=f?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b,l=/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d);if(l||this.isVisioData(g))l||(d=k?this.isRemoteVisioData(g)?"raw.vss":"raw.vssx":this.isRemoteVisioData(g)?
+"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){e(a)},c,d);else if(!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,d))this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&e(a.responseText)}),a);else if(this.isLucidChartData(g))this.convertLucidChart(g,mxUtils.bind(this,function(a){e(a)}),
+mxUtils.bind(this,function(a){c(a)}));else{if(/(\.png)($|\?)/i.test(d)||this.isPngData(g))g=this.extractGraphModelFromPng(b);e(g)}}catch(p){c(p)}}),c,/(\.png)($|\?)/i.test(d)||/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d),null,null,f)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab: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,c,b,k,f,l,d,g){b=d?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),n=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==l&&null!=this.stateArg&&null!=this.stateArg.folderId&&(l=this.stateArg.folderId),
 this.drive.insertFile(a,e,l,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,
 c,f,k,g)}),n,!1,l);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_BROWSER){m();var p=mxUtils.bind(this,function(){var b=new StorageFile(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,c,f,k,g)}),n)});null==localStorage.getItem(a)?
-p():this.confirm(mxResources.get("replaceIt",[a]),p,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else m(),this.fileCreated(new LocalFile(this,e,a,null==b),c,f,k,g)}catch(v){m(),this.handleError(v)}}};
+p():this.confirm(mxResources.get("replaceIt",[a]),p,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else m(),this.fileCreated(new LocalFile(this,e,a,null==b),c,f,k,g)}catch(u){m(),this.handleError(u)}}};
 App.prototype.fileCreated=function(a,e,c,b,k){var f=window.location.pathname;null!=e&&0<e.length&&(f+="?libs="+e);null!=k&&0<k.length&&(f+="?clibs="+k);f=this.getUrl(f);a.getMode()!=App.MODE_DEVICE&&(f+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var l=a.getData(),l=0<l.length?this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0):null,d=window.location.protocol+"//"+window.location.hostname+f,g=l,m=null;null!=l&&/\.svg$/i.test(a.getTitle())&&
 (m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),g=this.decodeNodeIntoGraph(g,m));a.setData(this.createFileData(l,m,a,d));null!=m&&m.container.parentNode.removeChild(m.container);var n=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(){n();var d=this.getCurrentFile();null==c&&null!=d&&(c=!d.isModified()&&null==d.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&a.addAllSavedStatus();
 null!=e&&this.sidebar.showEntries(e);if(null!=k){for(var b=[],d=k.split(";"),f=0;f<d.length;f++)b.push(decodeURIComponent(d[f]));this.loadLibraries(b)}}),l=mxUtils.bind(this,function(){c||null==d||!d.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==c||c?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
@@ -9982,16 +9983,16 @@ null!=b&&b()}else if("U"==a.charAt(0)){var k=decodeURIComponent(a.substring(1)),
 (c.getHash=function(){return"G"+a},window.location.hash="#"+c.getHash());null!=b&&b()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(k,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=k,e=k.lastIndexOf("."),f=d.lastIndexOf("/");e>f&&0<f&&(d=d.substring(f+1,e),e=k.substring(e),this.useCanvasForExport||
 ".png"!=e||(e=".drawio"),".svg"===e||".xml"===e||".html"===e||".png"===e||".drawio"===e)&&(c=d+e)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)||l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){l()||(this.spinner.stop(),
 this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(f=null,"G"==a.charAt(0)?f=this.drive:"D"==a.charAt(0)?f=this.dropbox:"W"==a.charAt(0)?f=this.oneDrive:"H"==a.charAt(0)?f=this.gitHub:"A"==a.charAt(0)?f=this.gitLab:"T"==a.charAt(0)&&(f=this.trello),null==f)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{var v=a.charAt(0);a=decodeURIComponent(a.substring(1));f.getFile(a,mxUtils.bind(this,function(c){this.spinner.stop();this.fileLoaded(c);var d=this.getCurrentFile();null==d?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(d.getHash=function(){return v+a},window.location.hash="#"+d.getHash()):c==d&&null==c.getMode()&&(c=mxResources.get("copyCreated"),
-this.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+"</div>"));null!=b&&b()}),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()}),null,null,"#"+v+a)}))}}),l=this.getCurrentFile(),d=mxUtils.bind(this,
+mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else{var u=a.charAt(0);a=decodeURIComponent(a.substring(1));f.getFile(a,mxUtils.bind(this,function(c){this.spinner.stop();this.fileLoaded(c);var d=this.getCurrentFile();null==d?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(d.getHash=function(){return u+a},window.location.hash="#"+d.getHash()):c==d&&null==c.getMode()&&(c=mxResources.get("copyCreated"),
+this.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+"</div>"));null!=b&&b()}),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()}),null,null,"#"+u+a)}))}}),l=this.getCurrentFile(),d=mxUtils.bind(this,
 function(){k||null==l||!l.isModified()?f():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=l&&(window.location.hash=l.getHash())}),f,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?d():null==l||e?d():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+a,null,d)).container,320,140,!0,!0)};
 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(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
 App.prototype.loadLibraries=function(a,e){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var c=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,k=[],f=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var c=a.length-1;0<=c;c--)null!=k[c]&&this.loadLibrary(k[c]);null!=e&&e()}});if(null!=a)for(var l=0;l<a.length;l++){var d=encodeURIComponent(decodeURIComponent(a[l]));mxUtils.bind(this,function(a,d){if(null!=
 a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var e=mxUtils.bind(this,function(c){delete this.pendingLibraries[a];k[d]=c;b--;f()}),g=mxUtils.bind(this,function(d){c(a,d);b--;f()});this.pendingLibraries[a]=!0;var l=a.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&
-(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):g()}),g)}catch(y){g()}}),0);else if("U"==l){var m=decodeURIComponent(a.substring(1));if(!this.isOffline()){l=m;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),m))}catch(y){g()}else g()}),function(){g()})}catch(z){g()}}}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),
-!this.isOffline())try{var l=JSON.parse(l),q={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,a,q))}catch(y){g()}}),function(){g()})}catch(z){g()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},g)}catch(z){g()}else{var u=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(u=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&
-(u=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(u=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(u=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(u=this.oneDrive);null!=u?u.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){g()}}),function(a){g()}):g(!0)}}})(d,l)}f()}};
+(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):g()}),g)}catch(y){g()}}),0);else if("U"==l){var m=decodeURIComponent(a.substring(1));this.isOffline()||this.loadTemplate(m,mxUtils.bind(this,function(a){null!=a&&0<a.length?e(new UrlLibrary(this,a,m)):g()}),g,null,!0)}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),!this.isOffline())try{var l=JSON.parse(l),q={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,
+a,q))}catch(y){g()}}),function(){g()})}catch(z){g()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},g)}catch(z){g()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==l&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){g()}}),function(a){g()}):g(!0)}}})(d,l)}f()}};
 App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
 Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
 this.commentButton=null);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.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight=
@@ -10008,10 +10009,10 @@ App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=
 window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.editor.graph.isSelectionEmpty()&&this.format.refresh()};
 App.prototype.showAuthDialog=function(a,e,c,b){var k=this.spinner.pause();this.showDialog((new AuthDialog(this,a,e,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();k()}))}catch(l){this.editor.setStatus(mxUtils.htmlEntities(l.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,c,b,k,f,l,d){var g=e;/\.svg$/i.test(g)||(g=g.substring(0,e.lastIndexOf("."))+b);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);m||(n.responseType="blob");if(d)for(var p in d)n.setRequestHeader(p,d[p]);n.onload=mxUtils.bind(this,function(){if(200<=
-n.status&&299>=n.status){var a=null;m?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){k(new LocalFile(this,a,g,!0))}),f,e)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});n.onerror=f;n.send()}else{var v=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(e)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&k(new LocalFile(this,
-c,g,!0))}else/\.png$/i.test(e)?(c=this.extractGraphModelFromPng(b),null!=c?k(new LocalFile(this,c,g,!0)):k(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?k(new LocalFile(this,a.responseText,g,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),e):k(new LocalFile(this,b,g,!0))}catch(u){null!=
-f&&f(u)}});c=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=c&&"image/"==c.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=k){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?"data:image/png;base64,"+b:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));v(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=
-f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})},d):null!=l?l(a,v,f,c):this.editor.loadUrl(a,v,f,c,null,null,null,d)}};
+n.status&&299>=n.status){var a=null;m?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){k(new LocalFile(this,a,g,!0))}),f,e)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});n.onerror=f;n.send()}else{var u=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(e)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&k(new LocalFile(this,
+c,g,!0))}else/\.png$/i.test(e)?(c=this.extractGraphModelFromPng(b),null!=c?k(new LocalFile(this,c,g,!0)):k(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?k(new LocalFile(this,a.responseText,g,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),e):k(new LocalFile(this,b,g,!0))}catch(v){null!=
+f&&f(v)}});c=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=c&&"image/"==c.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=k){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?"data:image/png;base64,"+b:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));u(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=
+f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})},d):null!=l?l(a,u,f,c):this.editor.loadUrl(a,u,f,c,null,null,null,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="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
 "click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
 "url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -10074,11 +10075,11 @@ mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(a,c){b.sp
 DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(n.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),null,!0))});"undefined"!==typeof MathJax&&(n=b.actions.addAction("mathematicalTypesetting",
 function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!b.isMathEnabled();k.model.execute(a)}),n.setToggleAction(!0),n.setSelectedCallback(function(){return b.isMathEnabled()}),n.isEnabled=f);if(isLocalStorage||mxClient.IS_CHROMEAPP)n=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),n.setToggleAction(!0),n.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var p=
 b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&b.editor.autosave});n=b.actions.addAction("compressed",function(){var a=b.getCurrentFile();null!=a&&(a.isCompressed()?a.decompress():a.compress())});n.setToggleAction(!0);n.setSelectedCallback(function(){var a=b.getCurrentFile();return null!=a&&a.isCompressed()});n.isEnabled=function(){return null!=b.getCurrentFile()};b.actions.addAction("editGeometry...",
-function(){for(var a=k.getSelectionCells(),c=[],d=0;d<a.length;d++)k.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var v="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" ");
+function(){for(var a=k.getSelectionCells(),c=[],d=0;d<a.length;d++)k.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var u="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" ");
 b.actions.addAction("copyStyle",function(){var a=k.view.getState(k.getSelectionCell());if(k.isEnabled()&&null!=a){b.copiedStyle=mxUtils.clone(a.style);for(var a=k.getModel().getStyle(a.cell),a=null!=a?a.split(";"):[],c=0;c<a.length;c++){var d=a[c],e=d.indexOf("=");if(0<=e){var f=d.substring(0,e),d=d.substring(e+1);null==b.copiedStyle[f]&&"none"==d&&(b.copiedStyle[f]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){if(k.isEnabled()&&!k.isSelectionEmpty()&&
-null!=b.copiedStyle){k.getModel().beginUpdate();try{for(var a=k.getSelectionCells(),c=0;c<a.length;c++)for(var d=k.view.getState(a[c]),e=0;e<v.length;e++){var f=v[e],g=b.copiedStyle[f];d.style[f]!=g&&k.setCellStyles(f,g,[a[c]])}}finally{k.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,
-320,170,!0,!0);a.init()}}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,u){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,k,!l,m,null,u)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),
-null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,u){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,k,!l,!1,"jpeg",u)}),!0,!1,"jpeg"):b.isOffline()||
+null!=b.copiedStyle){k.getModel().beginUpdate();try{for(var a=k.getSelectionCells(),c=0;c<a.length;c++)for(var d=k.view.getState(a[c]),e=0;e<u.length;e++){var f=u[e],g=b.copiedStyle[f];d.style[f]!=g&&k.setCellStyles(f,g,[a[c]])}}finally{k.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,
+320,170,!0,!0);a.init()}}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,k,!l,m,null,v)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),
+null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,k,!l,!1,"jpeg",v)}),!0,!1,"jpeg"):b.isOffline()||
 mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));n=b.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return k.shadowVisible});b.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){b.isOffline()||
 mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.alert(b.editor.appName+" "+EditorUi.VERSION):b.openLink("https://www.diagrams.net/")}));b.actions.addAction("userManual...",function(){b.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});b.actions.addAction("support...",function(){b.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});b.actions.addAction("exportOptionsDisabled...",function(){b.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
 mxResources.get("exportOptionsDisabled"))});b.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?b.openLink("shortcuts.svg"):b.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});b.actions.addAction("feedback...",function(){var a=new FeedbackDialog(b);b.showDialog(a.container,610,360,!0,!1);a.init()});b.actions.addAction("quickStart...",function(){b.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});
@@ -10095,7 +10096,7 @@ intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEd
 var n=this.get("layout"),q=n.funct;n.funct=function(a,c){q.apply(this,arguments);a.addSeparator(c);a.addItem(mxResources.get("orgChart")+"...",null,function(){var a=null,c=20,d=20,e=!0,f=function(){b.loadingOrgChart=!1;b.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=a&&e){var f=b.editor.graph;(new mxOrgChartLayout(f,a,c,d)).execute(f.getDefaultParent());e=!1}},g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width=
 "140px";mxUtils.write(k,mxResources.get("orgChartType")+": ");g.appendChild(k);var l=document.createElement("select");l.style.width="200px";l.style.boxSizing="border-box";for(var k=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],m=0;m<k.length;m++){var n=document.createElement("option");mxUtils.write(n,k[m]);n.value=m;2==
 m&&n.setAttribute("selected","selected");l.appendChild(n)}mxEvent.addListener(l,"change",function(){a=l.value});g.appendChild(l);k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("parentChildSpacing")+": ");g.appendChild(k);var x=document.createElement("input");x.type="number";x.value=c;x.style.width="200px";x.style.boxSizing="border-box";g.appendChild(x);mxEvent.addListener(x,"change",function(){c=x.value});
-k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("siblingSpacing")+": ");g.appendChild(k);var u=document.createElement("input");u.type="number";u.value=d;u.style.width="200px";u.style.boxSizing="border-box";g.appendChild(u);mxEvent.addListener(u,"change",function(){d=u.value});g=new CustomDialog(b,g,function(){null==a&&(a=2);"undefined"!==typeof mxOrgChartLayout||b.loadingOrgChart||b.isOffline(!0)?f():b.spinner.spin(document.body,
+k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("siblingSpacing")+": ");g.appendChild(k);var v=document.createElement("input");v.type="number";v.value=d;v.style.width="200px";v.style.boxSizing="border-box";g.appendChild(v);mxEvent.addListener(v,"change",function(){d=v.value});g=new CustomDialog(b,g,function(){null==a&&(a=2);"undefined"!==typeof mxOrgChartLayout||b.loadingOrgChart||b.isOffline(!0)?f():b.spinner.spin(document.body,
 mxResources.get("loading"))&&(b.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart.min.js",f):mxscript("js/extensions.min.js",f))});b.showDialog(g.container,355,125,!0,!0)},c,null,f());a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor=
 "dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft="8px";mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),e.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b}),null!=this.editorUi.menubar&&
 window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);this.addMenuItems(a,"- keyboardShortcuts quickStart - userManual support - about".split(" "),c)}"1"==urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",
@@ -10140,12 +10141,12 @@ f.apply(this,arguments)};n.visible="1"!=urlParams.embed;b.actions.addAction("mak
 a.setModified(!1);a.addAllSavedStatus()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),mxUtils.bind(this,function(a){b.handleError(a)})):b.createFile(c,b.getFileData(!0),null,d))}),mxUtils.bind(this,function(){b.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,null,null,b.editor.fileExtensions),b.showDialog(c.container,420,380,!0,!0),c.init()):b.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));b.actions.addAction("moveToFolder...",mxUtils.bind(this,
 function(){var a=b.getCurrentFile();if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var c=!1;if(a.getMode()==App.MODE_GOOGLE&&null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this,
 function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&b.drive.showPermissions(a.getId())}catch(B){b.handleError(B)}}));this.put("embed",
-new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var u=function(a,
+new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var v=function(a,
 c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())},z=function(a,c,d,e){var f=k.isMouseInsertPoint()?k.getInsertPoint():k.getFreeInsertPoint(),g=new mxCell(a,new mxGeometry(f.x,
 f.y,c,d),e);g.vertex=!0;k.getModel().beginUpdate();try{g=k.addCell(g),k.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{k.getModel().endUpdate()}k.scrollCellToVisible(g);k.setSelectionCell(g);k.container.focus();k.editAfterInsert&&k.startEditing(g);window.setTimeout(function(){null!=b.hoverIcons&&b.hoverIcons.update(k.view.getState(g))},0);return g};b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),
 !0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertText",new Action(mxResources.get("text"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(z("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=f;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus",
-new Action(mxResources.get("rhombus"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):u(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),
+new Action(mxResources.get("rhombus"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),
 c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){y(a,c,["fromText","plantUml",
 "mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,c){var d=b.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");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},
 c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):g&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+
@@ -10245,30 +10246,30 @@ null,null,!0,!0))}),b))})};(function(){var a=EditorUi.prototype.refresh;EditorUi
 (function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),e="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,k){k.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(k.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(e,
 a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,k));return k};a.beforeDecode=function(a,b,e){e.ui=a.ui;e.relatedPage=e.ui.getPageById(b.getAttribute("relatedPage"));if(null==e.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));e.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(e.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
 b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(e.relatedPage.root=a.decodeCell(c,!1),e=c.nextSibling,c.parentNode.removeChild(c),c=e;null!=c;){e=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var k=c.getAttribute("id");null==a.lookup(k)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=e}}return b};a.afterDecode=function(a,b,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,c,e,l,d){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var f=e.slice(),k=[],n=0;n<e.length;n++){var p=this.getCurrentCellStyle(e[n]);"1"==mxUtils.getValue(p,"treeFolding","0")&&(this.traverse(e[n],!0,mxUtils.bind(this,function(a,b){null!=b&&k.push(b);a!=e[n]&&k.push(a);return a==
-e[n]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[n],b))}for(n=0;n<k.length;n++)this.model.setVisible(k[n],!b);e=f;e=a.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return u.isVertex(a)&&e(a)}function c(a){var b=!1;null!=a&&(b="1"==q.getCurrentCellStyle(a).treeMoving);
-return b}function e(a){var b=!1;null!=a&&(a=u.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function l(a){var b=!1;null!=a&&(a=u.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function d(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
+e[n]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[n],b))}for(n=0;n<k.length;n++)this.model.setVisible(k[n],!b);e=f;e=a.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return v.isVertex(a)&&e(a)}function c(a){var b=!1;null!=a&&(b="1"==q.getCurrentCellStyle(a).treeMoving);
+return b}function e(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function l(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function d(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.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 g(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),e=q.getIncomingEdges(a),f=q.cloneCells([e[0],a]);q.model.setTerminal(f[0],q.model.getTerminal(e[0],!0),!0);var g=d(a),k=c.geometry;g==mxConstants.DIRECTION_SOUTH||
-g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;q.view.currentRoot!=c&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=q.view.getState(a),m=q.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*m;var u=q.getOutgoingEdges(q.model.getTerminal(e[0],
-!0));if(null!=u){for(var p=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,t=k=e=0;t<u.length;t++){var x=q.model.getTerminal(u[t],!1);if(g==d(x)){var v=q.view.getState(x);x!=a&&null!=v&&(p&&b!=v.getCenterX()<l.getCenterX()||!p&&b!=v.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,v)&&(e=10+Math.max(e,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}p?k=0:e=0;for(t=0;t<u.length;t++)if(x=q.model.getTerminal(u[t],
-!1),g==d(x)&&(v=q.view.getState(x),x!=a&&null!=v&&(p&&b!=v.getCenterX()<l.getCenterX()||!p&&b!=v.getCenterY()<l.getCenterY()))){var y=[];q.traverse(v.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});q.moveCells(y,(b?1:-1)*e,(b?1:-1)*k)}}}return q.addCells(f,c)}finally{q.model.endUpdate()}}function m(a){q.model.beginUpdate();try{var b=d(a),c=q.getIncomingEdges(a),e=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],e[1],!1);q.model.setTerminal(e[0],e[1],!0);q.model.setTerminal(e[0],a,!1);
+g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;q.view.currentRoot!=c&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=q.view.getState(a),m=q.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*m;var v=q.getOutgoingEdges(q.model.getTerminal(e[0],
+!0));if(null!=v){for(var p=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,t=k=e=0;t<v.length;t++){var x=q.model.getTerminal(v[t],!1);if(g==d(x)){var u=q.view.getState(x);x!=a&&null!=u&&(p&&b!=u.getCenterX()<l.getCenterX()||!p&&b!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(e=10+Math.max(e,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}p?k=0:e=0;for(t=0;t<v.length;t++)if(x=q.model.getTerminal(v[t],
+!1),g==d(x)&&(u=q.view.getState(x),x!=a&&null!=u&&(p&&b!=u.getCenterX()<l.getCenterX()||!p&&b!=u.getCenterY()<l.getCenterY()))){var z=[];q.traverse(u.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});q.moveCells(z,(b?1:-1)*e,(b?1:-1)*k)}}}return q.addCells(f,c)}finally{q.model.endUpdate()}}function m(a){q.model.beginUpdate();try{var b=d(a),c=q.getIncomingEdges(a),e=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],e[1],!1);q.model.setTerminal(e[0],e[1],!0);q.model.setTerminal(e[0],a,!1);
 var f=q.model.getParent(a),g=f.geometry,k=[];q.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);q.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);q.moveCells(k,l,m);return q.addCells(e,f)}finally{q.model.endUpdate()}}function n(a,b){q.model.beginUpdate();try{var c=
 q.model.getParent(a),e=q.getIncomingEdges(a),f=d(a);0==e.length&&(e=[q.createEdge(c,null,"",null,null,q.createCurrentEdgeStyle())],f=b);var g=q.cloneCells([e[0],a]);q.model.setTerminal(g[0],a,!0);if(null==q.model.getTerminal(g[0],!1)){q.model.setTerminal(g[0],g[1],!1);var k=q.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)q.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&q.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
-"vertical":"horizontal",[g[0]])}catch(P){}}var e=q.getOutgoingEdges(a),n=c.geometry,k=[];q.view.currentRoot==c&&(n=new mxRectangle);for(l=0;l<e.length;l++){var u=q.model.getTerminal(e[l],!1);null!=u&&k.push(u)}var p=q.view.getBounds(k),t=q.view.translate,x=q.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==p?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(p.x+p.width)/x-t.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
+"vertical":"horizontal",[g[0]])}catch(P){}}var e=q.getOutgoingEdges(a),n=c.geometry,k=[];q.view.currentRoot==c&&(n=new mxRectangle);for(l=0;l<e.length;l++){var v=q.model.getTerminal(e[l],!1);null!=v&&k.push(v)}var p=q.view.getBounds(k),t=q.view.translate,x=q.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==p?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(p.x+p.width)/x-t.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
 null==p?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(p.x+p.width)/x-t.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==p?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(p.y+p.height)/x-t.y+-n.y+10);return q.addCells(g,c)}finally{q.model.endUpdate()}}function p(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function v(a,b){var c=d(a),e=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==e&&c!=b?t.actions.get("selectParent").funct():
-c==b?(e=q.getOutgoingEdges(a),null!=e&&0<e.length&&q.setSelectionCell(q.model.getTerminal(e[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(e=p(q.model.getTerminal(c[0],!0),e,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(e,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=e.length-1&&q.setSelectionCell(e[c].cell)))))}var t=this,q=t.editor.graph,u=q.getModel(),z=t.menus.createPopupMenu;t.menus.createPopupMenu=function(b,c,d){z.apply(this,arguments);
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=d(a),e=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==e&&c!=b?t.actions.get("selectParent").funct():
+c==b?(e=q.getOutgoingEdges(a),null!=e&&0<e.length&&q.setSelectionCell(q.model.getTerminal(e[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(e=p(q.model.getTerminal(c[0],!0),e,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(e,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=e.length-1&&q.setSelectionCell(e[c].cell)))))}var t=this,q=t.editor.graph,v=q.getModel(),z=t.menus.createPopupMenu;t.menus.createPopupMenu=function(b,c,d){z.apply(this,arguments);
 if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);
 if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",
 function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var y=q.removeCells;q.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];u.isEdge(g)&&e(g)&&(d.push(g),g=u.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=q.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return y.apply(this,arguments)};t.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&e(g)&&(d.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=q.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return y.apply(this,arguments)};t.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
 d))};var A=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
-q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var x=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var u=0;u<b.length;u++)if(a(b[u])||q.model.isEdge(b[u])&&null==q.model.getTerminal(b[u],!0)){f=q.model.getParent(b[u]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var p=q.getIncomingEdges(b[0]);
-if(0<p.length){var t=q.view.getState(q.model.getTerminal(p[0],!0));if(null!=t){var v=q.view.getState(m);null!=v&&(c=(v.getCenterX()-t.getCenterX())/q.view.scale,d=(v.getCenterY()-t.getCenterY())/q.view.scale)}}}}l=x.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(u=0;u<l.length;u++)if(this.model.isEdge(l[u]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[u],!0))&&this.model.setTerminal(l[u],m,!0);else if(a(b[u])&&(p=q.getIncomingEdges(b[u]),0<p.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(p[0],!0))&&this.model.setTerminal(p[0],m,!0);else if(0==q.getIncomingEdges(l[u]).length){n=m;if(null==n||n==q.model.getParent(b[u]))n=q.model.getTerminal(p[0],!0);e=this.cloneCell(p[0]);this.addEdge(e,q.getDefaultParent(),n,l[u])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var B=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var x=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var v=0;v<b.length;v++)if(a(b[v])||q.model.isEdge(b[v])&&null==q.model.getTerminal(b[v],!0)){f=q.model.getParent(b[v]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var p=q.getIncomingEdges(b[0]);
+if(0<p.length){var t=q.view.getState(q.model.getTerminal(p[0],!0));if(null!=t){var u=q.view.getState(m);null!=u&&(c=(u.getCenterX()-t.getCenterX())/q.view.scale,d=(u.getCenterY()-t.getCenterY())/q.view.scale)}}}}l=x.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(v=0;v<l.length;v++)if(this.model.isEdge(l[v]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[v],!0))&&this.model.setTerminal(l[v],m,!0);else if(a(b[v])&&(p=q.getIncomingEdges(b[v]),0<p.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
+this.model.getTerminal(p[0],!0))&&this.model.setTerminal(p[0],m,!0);else if(0==q.getIncomingEdges(l[v]).length){n=m;if(null==n||n==q.model.getParent(b[v]))n=q.model.getTerminal(p[0],!0);e=this.cloneCell(p[0]);this.addEdge(e,q.getDefaultParent(),n,l[v])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var B=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
 null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},D=t.onKeyDown;t.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&
 (9==b.which?c=mxEvent.isShiftDown(b)?m(q.getSelectionCell()):n(q.getSelectionCell()):13==b.which&&(c=g(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];
-null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(v(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(v(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(v(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(v(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(I){t.handleError(I)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var F=q.connectVertex;q.connectVertex=
-function(b,c,e,f,k,l){var u=q.getIncomingEdges(b);return a(b)?(e=d(b),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c||0==u.length?n(b,c):f==k?m(b):g(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):F.call(this,b,c,e,f,k,l)};q.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||l(b)||q.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};
+null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(I){t.handleError(I)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var F=q.connectVertex;q.connectVertex=
+function(b,c,e,f,k,l){var v=q.getIncomingEdges(b);return a(b)?(e=d(b),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c||0==v.length?n(b,c):f==k?m(b):g(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):F.call(this,b,c,e,f,k,l)};q.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||l(b)||q.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};
 var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!l(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
 mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;t.hoverIcons.reset();mxEvent.consume(a)})))};var E=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){E.apply(this,arguments);null!=this.moveHandle&&
 (this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=
@@ -10277,9 +10278,9 @@ this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.m
 !0;e.edge=!0;b.insertEdge(e,!0);c.insertEdge(e,!1);a.insert(e);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
 b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;
 b.insertEdge(e,!0);c.insertEdge(e,!1);var k=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');p.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);p.insertEdge(v,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');t.vertex=!0;var q=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);t.insertEdge(q,!1);a.insert(e);a.insert(n);a.insert(v);a.insert(q);a.insert(b);a.insert(c);a.insert(k);a.insert(p);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');t.vertex=!0;var q=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);t.insertEdge(q,!1);a.insert(e);a.insert(n);a.insert(u);a.insert(q);a.insert(b);a.insert(c);a.insert(k);a.insert(p);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
 a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
 a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
 a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -10297,7 +10298,7 @@ g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("di
 c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,
 0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(null!=b?b:!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
 try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(u){}var k=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(v){}var k=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
 this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&
 (this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
 mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
@@ -10314,7 +10315,7 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt
 "lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
 this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
 (this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
-this.menus.findWindow=null);p.apply(this,arguments)};var v=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){v.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
+this.menus.findWindow=null);p.apply(this,arguments)};var u=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){u.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
 EditorUi.prototype.chromelessWindowResize=function(){};var t=Menus.prototype.init;Menus.prototype.init=function(){t.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
 function(){c.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
 function(){e(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);
@@ -10342,29 +10343,29 @@ null,640<=c?d("",e.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)"
 null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c?(null==M&&(e=t.addMenu("",a.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor=
 "pointer",e.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(e),M=e),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=M&&(M.parentNode.removeChild(M),M=null))}q.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=c||null!=urlParams.clibs||
 null!=urlParams.libs)&&e(this,!0);1E3<=c&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
-"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
+"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
 b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
 l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,J=document.createElement("div");J.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
 l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var H=t.addMenu("100%",K.funct);H.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");H.style.whiteSpace="nowrap";H.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";H.style.backgroundPosition="right 6px center";H.style.backgroundRepeat="no-repeat";H.style.backgroundColor="#ffffff";H.style.paddingRight="10px";H.style.display="block";H.style.position="absolute";H.style.textDecoration="none";H.style.textDecoration=
 "none";H.style.right="0px";H.style.bottom="0px";H.style.overflow="hidden";H.style.visibility="hidden";H.style.textAlign="center";H.style.color="#000";H.style.fontSize="12px";H.style.color="#707070";H.style.width="59px";H.style.cursor="pointer";H.style.borderTop="1px solid lightgray";H.style.borderLeft="1px solid lightgray";H.style.height=parseInt(l.tabContainerHeight)-1+"px";H.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";J.appendChild(H);K=mxUtils.bind(this,function(){H.innerHTML=Math.round(100*
 l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(H.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}J.appendChild(l.tabContainer);J.appendChild(n);J.appendChild(l.diagramContainer);
 k.appendChild(J);l.updateTabContainer();var M=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,l){var d=c.y,f=c.x,k=!1,n=!1;if(null!=this.states&&null!=b&&null!=c){var p=this,v=new mxCellState,t=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);v.x=b.x+f;v.y=b.y+d;v.width=b.width;v.height=b.height;for(var u=[],z=[],y=0;y<this.states.length;y++){var A=this.states[y];A instanceof mxCellState&&(l||!this.graph.isCellSelected(A.cell))&&((v.x>=A.x&&v.x<=A.x+A.width||A.x>=v.x&&A.x<=v.x+v.width)&&(v.y>
-A.y+A.height+4||v.y+v.height+4<A.y)?u.push(A):(v.y>=A.y&&v.y<=A.y+A.height||A.y>=v.y&&A.y<=v.y+v.height)&&(v.x>A.x+A.width+4||v.x+v.width+4<A.x)&&z.push(A))}var x=0,B=0,C=A=0,D=0,F=0,G=0,E=0,J=5*t;if(1<u.length){u.push(v);u.sort(function(a,b){return a.y-b.y});var K=!1,y=v==u[0],t=v==u[u.length-1];if(!y&&!t)for(y=1;y<u.length-1;y++)if(v==u[y]){t=u[y-1];y=u[y+1];A=B=C=(y.y-t.y-t.height-v.height)/2;break}for(y=0;y<u.length-1;y++){var t=u[y],H=u[y+1],L=v==t||v==H,H=H.y-t.y-t.height,K=K|v==t;if(0==B&&
-0==x)B=H,x=1;else if(Math.abs(B-H)<=(L||1==y&&K?q:0))x+=1;else if(1<x&&K){u=u.slice(0,y+1);break}else if(3<=u.length-y&&!K)x=0,A=B=0!=C?C:0,u.splice(0,0==y?1:y),y=-1;else break;0!=A||L||(B=A=H)}3==u.length&&u[1]==v&&(A=0)}if(1<z.length){z.push(v);z.sort(function(a,b){return a.x-b.x});K=!1;y=v==z[0];t=v==z[z.length-1];if(!y&&!t)for(y=1;y<z.length-1;y++)if(v==z[y]){t=z[y-1];y=z[y+1];G=F=E=(y.x-t.x-t.width-v.width)/2;break}for(y=0;y<z.length-1;y++){t=z[y];H=z[y+1];L=v==t||v==H;H=H.x-t.x-t.width;K|=v==
-t;if(0==F&&0==D)F=H,D=1;else if(Math.abs(F-H)<=(L||1==y&&K?q:0))D+=1;else if(1<D&&K){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!K)D=0,G=F=0!=E?E:0,z.splice(0,0==y?1:y),y=-1;else break;0!=G||L||(F=G=H)}3==z.length&&z[1]==v&&(G=0)}q=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};F=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==z.length-1){D=[];E=p.guidesArrHor;k=[];f=0;y=z[0]==v?1:0;K=z[y].y+z[y].height;if(0<G)for(y=0;y<z.length-1;y++)t=
-z[y],H=z[y+1],v==t?(f=H.x-t.width-G,k.push(new mxPoint(f+t.width+J,K)),k.push(new mxPoint(H.x-J,K))):v==H?(k.push(new mxPoint(t.x+t.width+J,K)),f=t.x+t.width+G,k.push(new mxPoint(f-J,K))):(k.push(new mxPoint(t.x+t.width+J,K)),k.push(new mxPoint(H.x-J,K)));else t=z[0],y=z[2],f=t.x+t.width+(y.x-t.x-t.width-v.width)/2,k.push(new mxPoint(t.x+t.width+J,K)),k.push(new mxPoint(f-J,K)),k.push(new mxPoint(f+v.width+J,K)),k.push(new mxPoint(y.x-J,K));for(y=0;y<k.length;y+=2)z=k[y],G=k[y+1],z=q(z,G,null!=E?
-E[y/2]:null),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=k.length/2;null!=E&&y<E.length;y++)E[y].destroy();p.guidesArrHor=D;f-=b.x;k=!0}else F(!0);if(1<x&&x==u.length-1){D=[];E=p.guidesArrVer;n=[];d=0;y=u[0]==v?1:0;x=u[y].x+u[y].width;if(0<A)for(y=0;y<u.length-1;y++)t=u[y],H=u[y+1],v==t?(d=H.y-t.height-A,n.push(new mxPoint(x,d+t.height+J)),n.push(new mxPoint(x,H.y-J))):v==H?(n.push(new mxPoint(x,t.y+t.height+J)),d=t.y+t.height+A,n.push(new mxPoint(x,d-J))):(n.push(new mxPoint(x,t.y+
-t.height+J)),n.push(new mxPoint(x,H.y-J)));else t=u[0],y=u[2],d=t.y+t.height+(y.y-t.y-t.height-v.height)/2,n.push(new mxPoint(x,t.y+t.height+J)),n.push(new mxPoint(x,d-J)),n.push(new mxPoint(x,d+v.height+J)),n.push(new mxPoint(x,y.y-J));for(y=0;y<n.length;y+=2)z=n[y],G=n[y+1],z=q(z,G,null!=E?E[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=n.length/2;null!=E&&y<E.length;y++)E[y].destroy();p.guidesArrVer=D;d-=b.y;n=!0}else F(!1,!0)}if(k||n)return v=new mxPoint(f,d),u=a.call(this,
-b,v,e,l),k&&!n?v.y=u.y:n&&!k&&(v.x=u.x),u.y!=v.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),u.x!=v.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),v;F(!0,!0);return a.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){e.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var l=0;l<b.length;l++)b[l].node.style.visibility=a?"visible":"hidden";if(null!=
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,l){var d=c.y,f=c.x,k=!1,n=!1;if(null!=this.states&&null!=b&&null!=c){var p=this,u=new mxCellState,t=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);u.x=b.x+f;u.y=b.y+d;u.width=b.width;u.height=b.height;for(var v=[],z=[],y=0;y<this.states.length;y++){var A=this.states[y];A instanceof mxCellState&&(l||!this.graph.isCellSelected(A.cell))&&((u.x>=A.x&&u.x<=A.x+A.width||A.x>=u.x&&A.x<=u.x+u.width)&&(u.y>
+A.y+A.height+4||u.y+u.height+4<A.y)?v.push(A):(u.y>=A.y&&u.y<=A.y+A.height||A.y>=u.y&&A.y<=u.y+u.height)&&(u.x>A.x+A.width+4||u.x+u.width+4<A.x)&&z.push(A))}var x=0,B=0,C=A=0,D=0,F=0,G=0,E=0,J=5*t;if(1<v.length){v.push(u);v.sort(function(a,b){return a.y-b.y});var K=!1,y=u==v[0],t=u==v[v.length-1];if(!y&&!t)for(y=1;y<v.length-1;y++)if(u==v[y]){t=v[y-1];y=v[y+1];A=B=C=(y.y-t.y-t.height-u.height)/2;break}for(y=0;y<v.length-1;y++){var t=v[y],H=v[y+1],L=u==t||u==H,H=H.y-t.y-t.height,K=K|u==t;if(0==B&&
+0==x)B=H,x=1;else if(Math.abs(B-H)<=(L||1==y&&K?q:0))x+=1;else if(1<x&&K){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!K)x=0,A=B=0!=C?C:0,v.splice(0,0==y?1:y),y=-1;else break;0!=A||L||(B=A=H)}3==v.length&&v[1]==u&&(A=0)}if(1<z.length){z.push(u);z.sort(function(a,b){return a.x-b.x});K=!1;y=u==z[0];t=u==z[z.length-1];if(!y&&!t)for(y=1;y<z.length-1;y++)if(u==z[y]){t=z[y-1];y=z[y+1];G=F=E=(y.x-t.x-t.width-u.width)/2;break}for(y=0;y<z.length-1;y++){t=z[y];H=z[y+1];L=u==t||u==H;H=H.x-t.x-t.width;K|=u==
+t;if(0==F&&0==D)F=H,D=1;else if(Math.abs(F-H)<=(L||1==y&&K?q:0))D+=1;else if(1<D&&K){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!K)D=0,G=F=0!=E?E:0,z.splice(0,0==y?1:y),y=-1;else break;0!=G||L||(F=G=H)}3==z.length&&z[1]==u&&(G=0)}q=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};F=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==z.length-1){D=[];E=p.guidesArrHor;k=[];f=0;y=z[0]==u?1:0;K=z[y].y+z[y].height;if(0<G)for(y=0;y<z.length-1;y++)t=
+z[y],H=z[y+1],u==t?(f=H.x-t.width-G,k.push(new mxPoint(f+t.width+J,K)),k.push(new mxPoint(H.x-J,K))):u==H?(k.push(new mxPoint(t.x+t.width+J,K)),f=t.x+t.width+G,k.push(new mxPoint(f-J,K))):(k.push(new mxPoint(t.x+t.width+J,K)),k.push(new mxPoint(H.x-J,K)));else t=z[0],y=z[2],f=t.x+t.width+(y.x-t.x-t.width-u.width)/2,k.push(new mxPoint(t.x+t.width+J,K)),k.push(new mxPoint(f-J,K)),k.push(new mxPoint(f+u.width+J,K)),k.push(new mxPoint(y.x-J,K));for(y=0;y<k.length;y+=2)z=k[y],G=k[y+1],z=q(z,G,null!=E?
+E[y/2]:null),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=k.length/2;null!=E&&y<E.length;y++)E[y].destroy();p.guidesArrHor=D;f-=b.x;k=!0}else F(!0);if(1<x&&x==v.length-1){D=[];E=p.guidesArrVer;n=[];d=0;y=v[0]==u?1:0;x=v[y].x+v[y].width;if(0<A)for(y=0;y<v.length-1;y++)t=v[y],H=v[y+1],u==t?(d=H.y-t.height-A,n.push(new mxPoint(x,d+t.height+J)),n.push(new mxPoint(x,H.y-J))):u==H?(n.push(new mxPoint(x,t.y+t.height+J)),d=t.y+t.height+A,n.push(new mxPoint(x,d-J))):(n.push(new mxPoint(x,t.y+
+t.height+J)),n.push(new mxPoint(x,H.y-J)));else t=v[0],y=v[2],d=t.y+t.height+(y.y-t.y-t.height-u.height)/2,n.push(new mxPoint(x,t.y+t.height+J)),n.push(new mxPoint(x,d-J)),n.push(new mxPoint(x,d+u.height+J)),n.push(new mxPoint(x,y.y-J));for(y=0;y<n.length;y+=2)z=n[y],G=n[y+1],z=q(z,G,null!=E?E[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=n.length/2;null!=E&&y<E.length;y++)E[y].destroy();p.guidesArrVer=D;d-=b.y;n=!0}else F(!1,!0)}if(k||n)return u=new mxPoint(f,d),v=a.call(this,
+b,u,e,l),k&&!n?u.y=v.y:n&&!k&&(u.x=v.x),v.y!=u.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=u.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),u;F(!0,!0);return a.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){e.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var l=0;l<b.length;l++)b[l].node.style.visibility=a?"visible":"hidden";if(null!=
 c)for(l=0;l<c.length;l++)c[l].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,e=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=e){for(f=0;f<e.length;f++)e[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,e,c,b){function k(){var b=a.diagramContainer;m.style.top=b.offsetTop-l+"px";m.style.left=b.offsetLeft-l+"px";m.style.width=(c?0:b.offsetWidth)+l+"px";m.style.height=(c?b.offsetHeight:0)+l+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var l=this.RULER_THICKNESS,d=this;this.unit=e;var g="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
 strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},m=document.createElement("div");m.style.position="absolute";m.style.background=g.bkgClr;m.style[c?"borderRight":"borderBottom"]="0.5px solid "+g.strokeClr;m.style.borderLeft="0.5px solid "+g.strokeClr;document.body.appendChild(m);mxEvent.disableContextMenu(m);this.editorUiRefresh=a.refresh;a.refresh=function(b){d.editorUiRefresh.apply(a,
-arguments);k()};k();var n=document.createElement("canvas");n.width=m.offsetWidth;n.height=m.offsetHeight;m.style.overflow="hidden";n.style.position="relative";m.appendChild(n);var p=n.getContext("2d");this.ui=a;var v=a.editor.graph;this.graph=v;this.container=m;this.canvas=n;var t=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);p.beginPath();p.moveTo(a+.5,b+.5);p.lineTo(d+.5,e+.5);p.stroke();f&&(c?(p.save(),p.translate(a,b),p.rotate(-Math.PI/2),p.fillText(f,0,0),
-p.restore()):p.fillText(f,a,b))},q=function(){p.clearRect(0,0,n.width,n.height);p.beginPath();p.lineWidth=.7;p.strokeStyle=g.strokeClr;p.setLineDash([]);p.font="9px Arial";p.textAlign="center";var a=v.view.scale,b=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.view.getGraphBounds(),k=v.pageVisible,m=k?l+(c?b.y-v.container.scrollTop:b.x-v.container.scrollLeft):l+(c?e.y-v.container.scrollTop:e.x-v.container.scrollLeft),q=0;k&&(q=c?Math.floor(((f.y+1)/a-e.y)/v.pageFormat.height)*v.pageFormat.height*
-a:Math.floor(((f.x+1)/a-e.x)/v.pageFormat.width)*v.pageFormat.width*a);var D,F,G;switch(d.unit){case mxConstants.POINTS:D=G=10;F=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;D=mxConstants.PIXELS_PER_MM;F=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/G,F=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}e=D;2<=a?e=D/(2*Math.floor(a/2)):.5>=a&&(e=D*Math.floor(1/a/2)*(d.unit==mxConstants.MILLIMETERS?2:1));D=null;b=k?Math.min(m+(c?b.height:b.width),
+arguments);k()};k();var n=document.createElement("canvas");n.width=m.offsetWidth;n.height=m.offsetHeight;m.style.overflow="hidden";n.style.position="relative";m.appendChild(n);var p=n.getContext("2d");this.ui=a;var u=a.editor.graph;this.graph=u;this.container=m;this.canvas=n;var t=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);p.beginPath();p.moveTo(a+.5,b+.5);p.lineTo(d+.5,e+.5);p.stroke();f&&(c?(p.save(),p.translate(a,b),p.rotate(-Math.PI/2),p.fillText(f,0,0),
+p.restore()):p.fillText(f,a,b))},q=function(){p.clearRect(0,0,n.width,n.height);p.beginPath();p.lineWidth=.7;p.strokeStyle=g.strokeClr;p.setLineDash([]);p.font="9px Arial";p.textAlign="center";var a=u.view.scale,b=u.view.getBackgroundPageBounds(),e=u.view.translate,f=u.view.getGraphBounds(),k=u.pageVisible,m=k?l+(c?b.y-u.container.scrollTop:b.x-u.container.scrollLeft):l+(c?e.y-u.container.scrollTop:e.x-u.container.scrollLeft),q=0;k&&(q=c?Math.floor(((f.y+1)/a-e.y)/u.pageFormat.height)*u.pageFormat.height*
+a:Math.floor(((f.x+1)/a-e.x)/u.pageFormat.width)*u.pageFormat.width*a);var D,F,G;switch(d.unit){case mxConstants.POINTS:D=G=10;F=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;D=mxConstants.PIXELS_PER_MM;F=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/G,F=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}e=D;2<=a?e=D/(2*Math.floor(a/2)):.5>=a&&(e=D*Math.floor(1/a/2)*(d.unit==mxConstants.MILLIMETERS?2:1));D=null;b=k?Math.min(m+(c?b.height:b.width),
 c?n.height:n.width):c?n.height:n.width;k&&(p.fillStyle=g.outBkgClr,c?(p.fillRect(0,l,l,m-l),p.fillRect(0,b,l,n.height)):(p.fillRect(l,0,m-l,l),p.fillRect(b,0,n.width,l)));p.fillStyle=g.fontClr;for(k=k?m:m%(e*a);k<=b;k+=e*a)if(f=Math.round((k-m)/a/e),!(k<l||f==D)){D=f;var E=null;0==f%G&&(E=d.formatText(q+f*e)+"");c?t(l-F[Math.abs(f)%G],k,l,k,E):t(k,l-F[Math.abs(f)%G],k,l,E)}p.lineWidth=1;t(c?0:l,c?l:0,l,l);p.fillStyle=g.cornerClr;p.fillRect(0,0,l,l)};this.drawRuler=q;this.sizeListener=e=f(function(){var a=
-v.container;c?(a=a.offsetHeight+l,n.height!=a&&(n.height=a,m.style.height=a+"px",q())):(a=a.offsetWidth+l,n.width!=a&&(n.width=a,m.style.width=a+"px",q()))},10);this.pageListener=function(){q()};this.scrollListener=b=f(function(){var a=c?v.container.scrollTop:v.container.scrollLeft;d.lastScroll!=a&&(d.lastScroll=a,q())},10);this.unitListener=function(a,b){d.setUnit(b.getProperty("unit"))};v.addListener(mxEvent.SIZE,e);v.container.addEventListener("scroll",b);v.view.addListener("unitChanged",this.unitListener);
+u.container;c?(a=a.offsetHeight+l,n.height!=a&&(n.height=a,m.style.height=a+"px",q())):(a=a.offsetWidth+l,n.width!=a&&(n.width=a,m.style.width=a+"px",q()))},10);this.pageListener=function(){q()};this.scrollListener=b=f(function(){var a=c?u.container.scrollTop:u.container.scrollLeft;d.lastScroll!=a&&(d.lastScroll=a,q())},10);this.unitListener=function(a,b){d.setUnit(b.getProperty("unit"))};u.addListener(mxEvent.SIZE,e);u.container.addEventListener("scroll",b);u.view.addListener("unitChanged",this.unitListener);
 a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){g=a;m.style.background=g.bkgClr;q()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,e,f){var k;if(c&&4<a.height||!c&&4<a.width){if(null!=d.guidePart)try{p.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),p.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),p.putImageData(d.guidePart.imgData3,
 d.guidePart.x3,d.guidePart.y3)}catch(L){}k=d.origGuideMove.apply(this,arguments);try{var m,n,q,u,v,y,z,A,H;p.lineWidth=.5;p.strokeStyle=g.guideClr;p.setLineDash([2]);c?(n=a.y+k.y+l-this.graph.container.scrollTop,m=0,v=n+a.height/2,u=l/2,A=n+a.height,z=0,q=p.getImageData(m,n-1,l,3),t(m,n,l,n),n--,y=p.getImageData(u,v-1,l,3),t(u,v,l,v),v--,H=p.getImageData(z,A-1,l,3),t(z,A,l,A),A--):(n=0,m=a.x+k.x+l-this.graph.container.scrollLeft,v=l/2,u=m+a.width/2,A=0,z=m+a.width,q=p.getImageData(m-1,n,3,l),t(m,
 n,m,l),m--,y=p.getImageData(u-1,v,3,l),t(u,v,u,l),u--,H=p.getImageData(z-1,A,3,l),t(z,A,z,l),z--);if(null==d.guidePart||d.guidePart.x1!=m||d.guidePart.y1!=n)d.guidePart={imgData1:q,x1:m,y1:n,imgData2:y,x2:u,y2:v,imgData3:H,x3:z,y3:A}}catch(L){}}else k=d.origGuideMove.apply(this,arguments);return k};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{p.putImageData(d.guidePart.imgData1,d.guidePart.x1,
@@ -10375,10 +10376,10 @@ this.pageListener);null!=this.container&&this.container.parentNode.removeChild(t
 function mxDualRuler(a,e){var c=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return c};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,e,!0);this.hRuler=new mxRuler(a,e,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,
 function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(e){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(e)||mxEvent.isPopupTrigger(e))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!c){var d=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));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);a.resetCurrentMenu();d.destroy()});var f=mxEvent.getClientX(e),k=mxEvent.getClientY(e);d.popup(f,k,null,e);a.setCurrentMenu(d,b)}mxEvent.consume(e)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
-mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var e=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=e){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,k=[],f,l=[],d,g=!1,m=!0,n=[],p=!1,v=!0;this.setClosedPath=function(a){g=a};this.setAutoClose=function(a){m=a};this.setStopClickEnabled=function(a){v=a};this.setSmoothing=function(a){c=a};var t=function(b){p=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
-b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){t(!0)};this.isDrawing=function(){return p};var q=mxUtils.bind(this,function(a){if(b){var c=v&&0<l.length&&null!=d&&2>d.length;c||l.push.apply(l,d);d=[];l.push(null);k.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<k.length){for(var c=l[0].x,d=l[0].x,e=l[0].y,f=l[0].y,n=1;n<l.length;n++)null!=l[n]&&(c=Math.max(c,l[n].x),d=Math.min(d,l[n].x),e=Math.max(e,
+mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var e=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=e){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,k=[],f,l=[],d,g=!1,m=!0,n=[],p=!1,u=!0;this.setClosedPath=function(a){g=a};this.setAutoClose=function(a){m=a};this.setStopClickEnabled=function(a){u=a};this.setSmoothing=function(a){c=a};var t=function(b){p=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
+b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){t(!0)};this.isDrawing=function(){return p};var q=mxUtils.bind(this,function(a){if(b){var c=u&&0<l.length&&null!=d&&2>d.length;c||l.push.apply(l,d);d=[];l.push(null);k.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<k.length){for(var c=l[0].x,d=l[0].x,e=l[0].y,f=l[0].y,n=1;n<l.length;n++)null!=l[n]&&(c=Math.max(c,l[n].x),d=Math.min(d,l[n].x),e=Math.max(e,
 l[n].y),f=Math.min(f,l[n].y));c-=d;e-=f;if(0<c&&0<e){var p=100/c,q=100/e;l.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-f)*q;return a});for(var u='<shape strokewidth="inherit"><foreground>',v=0,n=0;n<l.length;n++){var y=l[n];if(null==y){var y=!1,v=l[v],z=l[n-1];!g&&m&&(y=v.x-z.x,z=v.y-z.y,y=Math.sqrt(y*y+z*z)<=a.tolerance);if(g||y)u+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';u+="</path>"+(g||y?"<fillstroke/>":"<stroke/>");v=n+1}else u=n==v?u+('<path><move x="'+y.x.toFixed(2)+
 '" y="'+y.y.toFixed(2)+'"/>'):u+('<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>')}var n=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(u+"</foreground></shape>")+");fillColor=none;",u=a.view.scale,v=a.view.translate,L=new mxCell("",new mxGeometry(d/u-v.x,f/u-v.y,c/u,e/u),n);L.vertex=1;a.model.beginUpdate();try{L=a.addCell(L)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[L]));a.fireEvent(new mxEventObject("freehandInserted","cell",L));setTimeout(function(){a.setSelectionCells([L])},
 10)}for(n=0;n<k.length;n++)k[n].parentNode.removeChild(k[n]);b=null;k=[];l=[]}t(!1)};mxEvent.addGestureListeners(e,function(c){if(p){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var k=
-a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",k=k.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",k)}n=[];k=u(c);z(k);f="M"+k.x+" "+k.y;l.push(k);d=[];b.setAttribute("d",f);e.appendChild(b);mxEvent.consume(c)}},function(a){if(b){z(u(a));var c=y(0);if(c){f+=" L"+c.x+" "+c.y;l.push(c);var e="";d=[];for(var g=2;g<n.length;g+=2)c=y(g),e+=" L"+c.x+" "+c.y,d.push(c);b.setAttribute("d",f+e)}mxEvent.consume(a)}},q);var u=function(b){return mxUtils.convertPoint(a.container,
+a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",k=k.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",k)}n=[];k=v(c);z(k);f="M"+k.x+" "+k.y;l.push(k);d=[];b.setAttribute("d",f);e.appendChild(b);mxEvent.consume(c)}},function(a){if(b){z(v(a));var c=y(0);if(c){f+=" L"+c.x+" "+c.y;l.push(c);var e="";d=[];for(var g=2;g<n.length;g+=2)c=y(g),e+=" L"+c.x+" "+c.y,d.push(c);b.setAttribute("d",f+e)}mxEvent.consume(a)}},q);var v=function(b){return mxUtils.convertPoint(a.container,
 mxEvent.getClientX(b),mxEvent.getClientY(b))},z=function(a){for(n.push(a);n.length>c;)n.shift()},y=function(a){var b=n.length;if(1===b%2||b>=c){var d=0,e=0,f,g=0;for(f=a;f<b;f++)g++,a=n[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index b1ac0d739..f6ddb6c9f 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -3908,7 +3908,7 @@ App.prototype.saveFile = function(forceDialog, success)
  * @param {number} dx X-coordinate of the translation.
  * @param {number} dy Y-coordinate of the translation.
  */
-App.prototype.loadTemplate = function(url, onload, onerror, templateFilename)
+App.prototype.loadTemplate = function(url, onload, onerror, templateFilename, asLibrary)
 {
 	var base64 = false;
 	var realUrl = url;
@@ -3929,9 +3929,24 @@ App.prototype.loadTemplate = function(url, onload, onerror, templateFilename)
 		{
 			var data = (!base64) ? responseData : ((window.atob && !mxClient.IS_IE && !mxClient.IS_IE11) ?
 				atob(responseData) : Base64.decode(responseData));
+			var isVisioFilename = /(\.v(dx|sdx?))($|\?)/i.test(filterFn) ||
+				/(\.vs(x|sx?))($|\?)/i.test(filterFn);
 			
-			if (/(\.v(dx|sdx?))($|\?)/i.test(filterFn) || this.isVisioData(data))
+			if (isVisioFilename || this.isVisioData(data))
 			{
+				// Adds filename to control converter code
+				if (!isVisioFilename)
+				{
+					if (asLibrary)
+					{
+						filterFn = this.isRemoteVisioData(data) ? 'raw.vss' : 'raw.vssx';
+					}
+					else
+					{
+						filterFn = this.isRemoteVisioData(data) ? 'raw.vsd' : 'raw.vsdx';
+					}
+				}
+				
 				this.importVisio(this.base64ToBlob(responseData.substring(responseData.indexOf(',') + 1)), function(xml)
 				{
 					onload(xml);
@@ -3973,7 +3988,8 @@ App.prototype.loadTemplate = function(url, onload, onerror, templateFilename)
 		{
 			onerror(e);
 		}
-	}), onerror, /(\.png)($|\?)/i.test(filterFn) || /(\.v(dx|sdx?))($|\?)/i.test(filterFn), null, null, base64);
+	}), onerror, /(\.png)($|\?)/i.test(filterFn) || /(\.v(dx|sdx?))($|\?)/i.test(filterFn) ||
+		/(\.vs(x|sx?))($|\?)/i.test(filterFn), null, null, base64);
 };
 
 /**
@@ -4867,43 +4883,18 @@ App.prototype.loadLibraries = function(libs, done)
 							
 							if (!this.isOffline())
 							{
-								var realUrl = url;
-								
-								if (!this.editor.isCorsEnabledForUrl(realUrl))
-								{
-									var nocache = 't=' + new Date().getTime();
-									realUrl = PROXY_URL + '?url=' + encodeURIComponent(url) + '&' + nocache;
-								}
-								
-								try
+								this.loadTemplate(url, mxUtils.bind(this, function(text)
 								{
-									// Uses proxy to avoid CORS issues
-									mxUtils.get(realUrl, mxUtils.bind(this, function(req)
+									if (text != null && text.length > 0)
 									{
-										if (req.getStatus() >= 200 && req.getStatus() <= 299)
-										{
-											try
-											{
-												onload(new UrlLibrary(this, req.getText(), url));
-											}
-											catch (e)
-											{
-												onerror();
-											}
-										}
-										else
-										{
-											onerror();
-										}
-									}), function()
+										// LATER: Convert mxfile to mxlibrary using code from libraryLoaded
+										onload(new UrlLibrary(this, text, url));
+									}
+									else
 									{
 										onerror();
-									});
-								}
-								catch (e)
-								{
-									onerror();
-								}
+									}
+								}), onerror, null, true);
 							}
 						}
 						else if (service == 'R')
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 86b2df29a..785af8f65 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -8481,7 +8481,7 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
 	{
 		return function(data, mimeType, x, y, w, h, img, doneFn, file)
 		{
-			if (file != null && (/(\.vsdx)($|\?)/i.test(file.name) || /(\.vssx)($|\?)/i.test(file.name)))
+			if (file != null && (/(\.v(dx|sdx?))($|\?)/i.test(file.name) || /(\.vs(x|sx?))($|\?)/i.test(file.name)))
 			{
 				editorUi.importVisio(file, mxUtils.bind(this, function(xml)
 				{
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 50d673f3f..eff6340ef 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -743,13 +743,25 @@
 	 */
 	EditorUi.prototype.isVisioData = function(data)
 	{
-		return data.length > 8 && (data.charCodeAt(0) == 0xD0 && data.charCodeAt(1) == 0xCF &&
+		return data.length > 8 && ((data.charCodeAt(0) == 0xD0 && data.charCodeAt(1) == 0xCF &&
 			data.charCodeAt(2) == 0x11 && data.charCodeAt(3) == 0xE0 && data.charCodeAt(4) == 0xA1 && data.charCodeAt(5) == 0xB1 &&
 			data.charCodeAt(6) == 0x1A && data.charCodeAt(7) == 0xE1) || (data.charCodeAt(0) == 0x50 && data.charCodeAt(1) == 0x4B &&
 			data.charCodeAt(2) == 0x03 && data.charCodeAt(3) == 0x04) || (data.charCodeAt(0) == 0x50 && data.charCodeAt(1) == 0x4B &&
-			data.charCodeAt(2) == 0x03 && data.charCodeAt(3) == 0x06);
+			data.charCodeAt(2) == 0x03 && data.charCodeAt(3) == 0x06));
 	};
 
+	/**
+	 * Returns true if the given binary data is a Visio file that requires remote conversion.
+	 * This code returns true for vss, vsd and vdx files.
+	 */
+	EditorUi.prototype.isRemoteVisioData = function(data)
+	{
+		return data.length > 8 && ((data.charCodeAt(0) == 0xD0 && data.charCodeAt(1) == 0xCF &&
+			data.charCodeAt(2) == 0x11 && data.charCodeAt(3) == 0xE0 && data.charCodeAt(4) == 0xA1 && data.charCodeAt(5) == 0xB1 &&
+			data.charCodeAt(6) == 0x1A && data.charCodeAt(7) == 0xE1) || (data.charCodeAt(0) == 0x3C && data.charCodeAt(1) == 0x3F &&
+			data.charCodeAt(2) == 0x78 && data.charCodeAt(3) == 0x6D && data.charCodeAt(3) == 0x6C));
+	};
+	
 	/**
 	 * Returns true if the given binary data is a PNG file.
 	 */
@@ -6647,6 +6659,15 @@
 					{
 						ext = filename.substring(dot + 1).toUpperCase();
 					}
+					else
+					{
+						var slash = filename.lastIndexOf('/');
+						
+						if (slash >= 0 && slash < filename.length)
+						{
+							filename = filename.substring(slash + 1);
+						}
+					}
 					
 					EditorUi.logEvent({category: ext + '-MS-IMPORT-FILE',
 						action: 'filename_' + filename,
diff --git a/src/main/webapp/js/diagramly/Extensions.js b/src/main/webapp/js/diagramly/Extensions.js
index f3c8b65a2..cb333dabc 100644
--- a/src/main/webapp/js/diagramly/Extensions.js
+++ b/src/main/webapp/js/diagramly/Extensions.js
@@ -3,6 +3,7 @@
  * 
  * TODO: Move to dynamic loading minimized plugin.
  */
+//This covers version 52 of Lucidchart ("BCUVersion": 52 or "BackwardsCompatibilityStateVersion": 52)
 LucidImporter = {};
 (function()
 {
@@ -6107,6 +6108,7 @@ LucidImporter = {};
 				var laneStyle = 'swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;startSize=' + laneTxtHeight + ';dropTarget=0;rounded=0;' + 
 								(rotatedSL? 'horizontal=0;': '') +
 								(isBPMN? 'swimlaneLine=0;fillColor=none;' : '');
+				p['Rotation'] = 0; //Override rotation such that it doesn't mess with our coordinates
 				
 				for (var j = 0; j < lanesNum; j++)
 				{
@@ -6122,8 +6124,11 @@ LucidImporter = {};
 						var i = j;
 						var curLane = laneFld[j];
 					}
-					
-					lane.push(new mxCell('', new mxGeometry(w * totalOffset, 0,	w * currOffset, h), laneStyle));
+
+					var childX = w * totalOffset;
+					var childY = isPool? mainTxtHeight : 0;
+					lane.push(new mxCell('', rotatedSL? new mxGeometry(childY, childX,	h - childY, w * currOffset) :
+						new mxGeometry(childX, childY,	w * currOffset, h - childY), laneStyle));
 					
 					lane[j].vertex = true;
 					v.insert(lane[j]);
diff --git a/src/main/webapp/js/diagramly/GitLabClient.js b/src/main/webapp/js/diagramly/GitLabClient.js
index 3694e1d99..1bbdcf4c7 100644
--- a/src/main/webapp/js/diagramly/GitLabClient.js
+++ b/src/main/webapp/js/diagramly/GitLabClient.js
@@ -236,7 +236,7 @@ GitLabClient.prototype.executeRequest = function(req, success, error, ignoreNotF
 /**
  * Finds index of ref in given token list. This is required to support groups and subgroups.
  */
-GitLabClient.prototype.getRefIndex = function(tokens, isFolder, success, error, knownRefPos)
+GitLabClient.prototype.getRefIndex = function(tokens, isFolder, success, error, knownRefPos, checkRepo)
 {
 	if (knownRefPos != null)
 	{
@@ -261,8 +261,8 @@ GitLabClient.prototype.getRefIndex = function(tokens, isFolder, success, error,
 				var ref = tokens[refPos];
 				var path = tokens.slice(refPos + 1, tokens.length).join('/');
 				var url = this.baseUrl + '/projects/' + encodeURIComponent(org + '/' + repo) + '/repository/' +
-					(!isFolder ? 'files/' + encodeURIComponent(path) + '?ref=' + ref :
-					'tree?path=' + path + '&ref=' + ref);
+					(!isFolder ? 'files/' + encodeURIComponent(path) + '?ref=' + ref : (checkRepo ?
+					'branches?per_page=1&page=1&ref=' + ref : 'tree?path=' + path + '&ref=' + ref));
 				
 				var req = new mxXmlRequest(url, null, 'HEAD');
 				
@@ -450,8 +450,9 @@ GitLabClient.prototype.createGitLabFile = function(org, repo, ref, data, asLibra
 GitLabClient.prototype.insertFile = function(filename, data, success, error, asLibrary, folderId, base64Encoded)
 {
 	asLibrary = (asLibrary != null) ? asLibrary : false;
+	var tok = folderId.split('/');
 	
-	this.getRefIndex(folderId.split('/'), true, mxUtils.bind(this, function(tokens, refPos)
+	this.getRefIndex(tok, true, mxUtils.bind(this, function(tokens, refPos)
 	{
 		var repoPos = Math.max(refPos - 1, 0);
 		var org = tokens.slice(0, repoPos).join('/');
@@ -511,7 +512,7 @@ GitLabClient.prototype.insertFile = function(filename, data, success, error, asL
 				error();
 			}
 		}))
-	}), error);
+	}), error, null, tok.length <= 4);
 };
 
 /**
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index 42b91f38d..206ca891a 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -10,7 +10,7 @@ function l(b,n){return(n?"overflow=width;html=1;":a(b)+d(b)+k(b)+w(b)+y(b)+A(b)+
 a,d,k,n))+b(mxConstants.STYLE_SPACING,a,d,k,n)+b(mxConstants.STYLE_VERTICAL_ALIGN,a,d,k,n)+b(mxConstants.STYLE_STROKECOLOR,a,d,k,n)+b(mxConstants.STYLE_OPACITY,a,d,k,n)+b(mxConstants.STYLE_ROUNDED,a,d,k,n)+b(mxConstants.STYLE_ROTATION,a,d,k,n)+b(mxConstants.STYLE_FLIPH,a,d,k,n)+b(mxConstants.STYLE_FLIPV,a,d,k,n)+b(mxConstants.STYLE_SHADOW,a,d,k,n)+b(mxConstants.STYLE_FILLCOLOR,a,d,k,n)+b(mxConstants.STYLE_DASHED,a,d,k,n)+b(mxConstants.STYLE_STROKEWIDTH,a,d,k,n)+b(mxConstants.STYLE_IMAGE,a,d,k,n)}
 function b(b,n,c,f,h){a:{if(null!=n&&null!=b){if(n.includes(";"+b+"=")){n=!0;break a}if(n.substring(0,b.length+1)==b+"="){n=!0;break a}}n=!1}if(!n)switch(b){case mxConstants.STYLE_FONTSIZE:return a(c);case mxConstants.STYLE_FONTCOLOR:return d(c);case mxConstants.STYLE_FONTSTYLE:return k(c);case mxConstants.STYLE_ALIGN:return w(c);case mxConstants.STYLE_SPACING_LEFT:return y(c);case mxConstants.STYLE_SPACING_RIGHT:return A(c);case mxConstants.STYLE_SPACING_TOP:return z(c);case mxConstants.STYLE_SPACING_BOTTOM:return B(c);
 case mxConstants.STYLE_SPACING:return C(c);case mxConstants.STYLE_VERTICAL_ALIGN:return E(c);case mxConstants.STYLE_STROKECOLOR:return D(c,f);case mxConstants.STYLE_OPACITY:return M(c,f,h);case mxConstants.STYLE_ROUNDED:return f=!h.edge&&!h.style.includes("rounded")&&null!=c.Rounding&&0<c.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*c.Rounding+";":"",f;case mxConstants.STYLE_ROTATION:return b="",null!=c.Rotation&&(c=mxUtils.toDegree(parseFloat(c.Rotation)),n=!0,0!=c&&("UMLSwimLaneBlockV2"==
-f.Class||(0<=f.Class.indexOf("Rotated")||-90==c||270==c)&&(0<=f.Class.indexOf("Pool")||0<=f.Class.indexOf("SwimLane")))?(c+=90,h.geometry.rotate90(),n=!1):0<=mxUtils.indexOf(Nc,f.Class)?(c-=90,h.geometry.rotate90()):0<=mxUtils.indexOf(Oc,f.Class)&&(c+=180),0!=c&&(b+="rotation="+c+";"),n||(b+="horizontal=0;")),b;case mxConstants.STYLE_FLIPH:return f=c.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=c.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return X(c);case mxConstants.STYLE_FILLCOLOR:return O(c,
+f.Class||(0<=f.Class.indexOf("Rotated")||-90==c||270==c)&&(0<=f.Class.indexOf("Pool")||0<=f.Class.indexOf("SwimLane")))?(c+=90,h.geometry.rotate90(),n=!1):0<=mxUtils.indexOf(Pc,f.Class)?(c-=90,h.geometry.rotate90()):0<=mxUtils.indexOf(Qc,f.Class)&&(c+=180),0!=c&&(b+="rotation="+c+";"),n||(b+="horizontal=0;")),b;case mxConstants.STYLE_FLIPH:return f=c.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=c.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return X(c);case mxConstants.STYLE_FILLCOLOR:return O(c,
 f);case mxConstants.STYLE_DASHED:return ma(c);case mxConstants.STYLE_STROKEWIDTH:return ia(c);case mxConstants.STYLE_IMAGE:return f="ImageSearchBlock2"==f.Class?"image="+c.URL+";":"UserImage2Block"==f.Class&&null!=c.ImageFillProps&&null!=c.ImageFillProps.url?"image="+c.ImageFillProps.url+";":"",f}return""}function a(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function d(a){a=e(a);if(null!=a)for(var b=
 0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}function k(a){return n(e(a))}function n(a){if(null!=a){var b=0,d=!1;if(null!=a)for(var k=0;!d&&k<a.length;){var n=a[k];"b"==n.n?null!=n.v&&n.v&&(d=!0,b+=1):"fc"==n.n&&"Bold"==n.v&&(d=!0,b+=1);k++}d=!1;if(null!=a)for(k=0;!d&&k<a.length;)n=a[k],"i"==n.n&&null!=n.v&&n.v&&(d=!0,b+=2),k++;d=!1;if(null!=a)for(k=0;!d&&k<a.length;)n=a[k],"u"==n.n&&
 null!=n.v&&n.v&&(d=!0,b+=4),k++;if(0<b)return"fontStyle="+b+";"}return""}function w(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function y(a){var b=e(a);if(null!=b)for(var d=0;d<b.length;){var k=b[d];if(null!=k.v){if("il"==k.n)return"spacingLeft="+.6*k.v+";";w(a)}d++}return""}function A(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function z(a){a=e(a);
@@ -20,8 +20,8 @@ typeof a.Title_VAlign?"verticalAlign="+a.Title_VAlign+";":nb(mxConstants.STYLE_V
 a.substr(7))/2.55)+";":""}function O(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return nb(mxConstants.STYLE_FILLCOLOR,ba(a.FillColor.cs[0].c))+nb(mxConstants.STYLE_GRADIENTCOLOR,ba(a.FillColor.cs[1].c))}else return"string"===typeof a.FillColor?nb(mxConstants.STYLE_FILLCOLOR,ba(a.FillColor),"#FFFFFF"):nb(mxConstants.STYLE_FILLCOLOR,"none");return""}function ma(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?
 "dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 2;":"longdash"==a.StrokeStyle?"dashed=1;dashPattern=16 6;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,6)?"dashed=1;":""}function ia(a){return nb(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(a.LineWidth)),"1")}function Z(a,b,d,k){for(var n=b,c=0;null!=k.getAttributeForCell(a,n);)c++,n=b+"_"+c;k.setAttributeForCell(a,n,null!=d?d:"")}function Fb(a,b,d,k,n,f){var h=q(b);if(null!=h){var w=Gb[h.Class];
 null!=w&&(a.style+=w+";");w=null!=h.Properties?h.Properties:h;if(null!=w){a.value=f?"":g(w);a.style+=c(a.style,w,h,a,x);a.style.includes("strokeColor")||(a.style+=D(w,h));if(null!=w.Link&&0<w.Link.length&&"ext"==w.Link[0].tp)d.setAttributeForCell(a,"link",w.Link[0].url);else if(null!=w.Text){a:{f=e(w.Text);if(null!=f)for(h=0;h<f.length;h++)if(f[h].n=null!=f[h].v&&0<f[h].v.length&&"ext"==f[h].v[0].tp){f=f[h].v[0].url;break a}f=null}null!=f&&d.setAttributeForCell(a,"link",f)}f=[];var h=d.convertValueToString(a),
-l=!1;if(null!=h){for(var y=0;match=Pc.exec(h);){var A=match[0],l=!0;if(2<A.length){var z=A.substring(2,A.length-2);"documentName"==z?z="filename":"date:"==z.substring(0,5)?z="date{"+z.substring(5).replace(/MMMM/g,"mmmm")+"}":"i18nDate:"==z.substring(0,9)&&(z="date{"+z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");z="%"+z+"%";f.push(h.substring(y,match.index)+(null!=z?z:A));y=match.index+A.length}}l&&(f.push(h.substring(y)),d.setAttributeForCell(a,
-"label",f.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var na in w)if(w.hasOwnProperty(na)&&na.toString().startsWith("ShapeData_"))try{var B=w[na],C=mxUtils.trim(B.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Z(a,C,B.Value,d)}catch(Fd){window.console&&console.log("Ignored "+na+":",Fd)}if(a.edge){a.style=null!=w.Rounding&&"diagonal"!=w.Shape?a.style+("rounded=1;arcSize="+w.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=w.Shape)if(null!=w.ElbowPoints)for(a.geometry.points=
+l=!1;if(null!=h){for(var y=0;match=Rc.exec(h);){var A=match[0],l=!0;if(2<A.length){var z=A.substring(2,A.length-2);"documentName"==z?z="filename":"date:"==z.substring(0,5)?z="date{"+z.substring(5).replace(/MMMM/g,"mmmm")+"}":"i18nDate:"==z.substring(0,9)&&(z="date{"+z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");z="%"+z+"%";f.push(h.substring(y,match.index)+(null!=z?z:A));y=match.index+A.length}}l&&(f.push(h.substring(y)),d.setAttributeForCell(a,
+"label",f.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var na in w)if(w.hasOwnProperty(na)&&na.toString().startsWith("ShapeData_"))try{var B=w[na],C=mxUtils.trim(B.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Z(a,C,B.Value,d)}catch(Id){window.console&&console.log("Ignored "+na+":",Id)}if(a.edge){a.style=null!=w.Rounding&&"diagonal"!=w.Shape?a.style+("rounded=1;arcSize="+w.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=w.Shape)if(null!=w.ElbowPoints)for(a.geometry.points=
 [],na=0;na<w.ElbowPoints.length;na++)a.geometry.points.push(new mxPoint(Math.round(.6*w.ElbowPoints[na].x+vb),Math.round(.6*w.ElbowPoints[na].y+wb)));else"elbow"==w.Shape?a.style=null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":a.style+"edgeStyle=elbowEdgeStyle;":null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==w.Shape&&(a.style+="curved=1;"));null!=w.Endpoint1.Style&&(null!=xb[w.Endpoint1.Style]?a.style+=
 "startArrow="+xb[w.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint1.Style));null!=w.Endpoint2.Style&&(null!=xb[w.Endpoint2.Style]?a.style+="endArrow="+xb[w.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint2.Style));B=w.ElbowControlPoints||w.Joints;if(null!=B)for(a.geometry.points=[],na=0;na<B.length;na++)C=B[na],a.geometry.points.push(new mxPoint(Math.round(.6*C.x+vb),Math.round(.6*C.y+wb)));
 na=!1;null==w.ElbowPoints&&null!=w.Endpoint1.Block&&w.Endpoint1.Block==w.Endpoint2.Block&&null==w.ElbowControlPoints&&null!=k&&null!=n&&(k=new mxPoint(Math.round(k.geometry.x+k.geometry.width*w.Endpoint1.LinkX),Math.round(k.geometry.y+k.geometry.height*w.Endpoint1.LinkY)),n=new mxPoint(Math.round(n.geometry.x+n.geometry.width*w.Endpoint2.LinkX),Math.round(n.geometry.y+n.geometry.height*w.Endpoint2.LinkY)),vb=k.x==n.x?20:0,wb=0,a.geometry.points=[new mxPoint(k.x+vb,k.y+wb),new mxPoint(n.x+vb,n.y+wb)],
@@ -29,11 +29,11 @@ implicitX=k.y==n.y,na=k.x==n.x);pa(a,w.Endpoint1,!0,na);pa(a,w.Endpoint2,!1,na)}
 new mxCell("",new mxGeometry(v.geometry.x,v.geometry.y,v.geometry.width,v.geometry.height),"html=1;whiteSpace=wrap;");k.vertex=!0;var n=q(a);null!=n&&(d=null!=n.Properties?n.Properties:n,null!=d&&(k.style+=c(k.style,d,n,k)));v.geometry.x=0;v.geometry.y=0;v.style+="part=1;";k.insert(v);v=k}return v}function Va(a,b,d){var k=2*(parseFloat(a.Location)-.5);isNaN(k)&&null!=a.Text&&null!=a.Text.Location&&(k=2*(parseFloat(a.Text.Location)-.5));d=mxCell;var c=g(a),k=new mxGeometry(isNaN(k)?0:k,0,0,0),f="11",
 w="";if(null!=a&&null!=a.Value&&null!=a.Value.m)for(var w=n(a.Value.m),l=0;l<a.Value.m.length;l++)if("s"==a.Value.m[l].n)f=.6*parseFloat(a.Value.m[l].v);else if("c"==a.Value.m[l].n){var y=a.Value.m[l].v;null!=y&&("#"!=y.charAt(0)&&(y="#"+y),y=y.substring(0,7));w+="fontColor="+y+";"}a=new d(c,k,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+(w+";fontSize="+f+";"));a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function nb(a,b,d,k){null!=b&&null!=
 k&&(b=k(b));return null!=b&&b!=d?a+"="+b+";":""}function pa(a,b,d,k,n){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(k?"":(d?"exitX":"entryX")+"="+b.LinkX+";")+(n?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function bc(a,b){try{var d=new mxCell("",new mxGeometry,"group;dropTarget=0;");d.vertex=!0;var k=Infinity,n=Infinity,c=-Infinity,f=-Infinity,w=a.Members||a.Action.Properties.Members,l;for(l in w){var y=b[l];null!=y&&(k=Math.min(k,y.geometry.x),n=Math.min(n,
-y.geometry.y),c=Math.max(c,y.geometry.x+y.geometry.width),f=Math.max(f,y.geometry.y+y.geometry.height));y.parent=d;d.insert(y)}d.geometry.x=k;d.geometry.y=n;d.geometry.width=c-k;d.geometry.height=f-n;for(c=0;c<d.children.length;c++){var A=d.children[c].geometry;A.x-=k;A.y-=n}return d}catch(Ed){console.log(Ed)}}function fa(a,b,d,k,n,c){a.getModel().beginUpdate();try{var h=function(b,d){var k=null!=d.Endpoint1.Block?w[d.Endpoint1.Block]:null,n=null!=d.Endpoint2.Block?w[d.Endpoint2.Block]:null,c;c=new mxCell("",
+y.geometry.y),c=Math.max(c,y.geometry.x+y.geometry.width),f=Math.max(f,y.geometry.y+y.geometry.height));y.parent=d;d.insert(y)}d.geometry.x=k;d.geometry.y=n;d.geometry.width=c-k;d.geometry.height=f-n;for(c=0;c<d.children.length;c++){var A=d.children[c].geometry;A.x-=k;A.y-=n}return d}catch(Hd){console.log(Hd)}}function fa(a,b,d,k,n,c){a.getModel().beginUpdate();try{var h=function(b,d){var k=null!=d.Endpoint1.Block?w[d.Endpoint1.Block]:null,n=null!=d.Endpoint2.Block?w[d.Endpoint2.Block]:null,c;c=new mxCell("",
 new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;Fb(c,b,a,k,n,!0);var h=q(b).Properties,l=null!=h?h.TextAreas:b.TextAreas;if(null!=l){for(var y=0;null!=l["t"+y];){var A=l["t"+y];c=Va(A,c);y++}for(y=0;null!=l["m"+y]||1>y;)A=l["m"+y],null!=A&&(c=Va(A,c,b)),y++;null!=l.Text&&(c=Va(l.Text,c,b));l=null!=h?h.TextAreas:b.TextAreas;null!=l.Message&&(c=Va(l.Message,c,b))}null==k&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6*
 d.Endpoint1.y)),!0);null==n&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);f.push(a.addCell(c,null,null,k,n))},f=[],w={},l=[],y=[],A=0;if(null!=b.Groups)for(var g in b.Groups){var z=b.Groups[g];z.id=g;if(1==z.Hidden&&null!=z.Members){0>mxUtils.indexOf(y,g)&&y.push(g);for(var e in z.Members)y=cc(e,b.Groups,y)}}if(null!=b.Blocks)for(g in b.Blocks)z=b.Blocks[g],z.id=g,0>mxUtils.indexOf(y,g)&&(e=!1,null!=Gb[z.Class]&&"mxCompositeShape"==
 Gb[z.Class]&&(w[z.id]=dc(z,f,a),l.push(z),e=!0),e||(w[z.id]=da(z,a),l.push(z)));else{for(A=0;A<b.Objects.length;A++)z=b.Objects[A],null!=z.Action&&"mxCompositeShape"==Gb[z.Action.Class]?w[z.id]=dc(z,f,a):z.IsBlock&&null!=z.Action&&null!=z.Action.Properties&&(w[z.id]=da(z,a)),l.push(z);for(A=0;A<b.Objects.length;A++)if(z=b.Objects[A],z.IsGroup){var B=bc(z,w);B&&(w[z.id]=B,l.push(z))}}if(null!=b.Groups)try{for(g in b.Groups)if(z=b.Groups[g],z.id=g,0==z.Hidden&&null!=z.Members&&(B=bc(z,w)))w[z.id]=B,
-l.push(z)}catch($b){console.log($b)}if(null!=b.Lines)for(g in b.Lines)0>mxUtils.indexOf(y,g)&&(z=b.Lines[g],z.id=g,l.push(z));l.sort(function(a,b){a=q(a);b=q(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,k=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=k?d-k:0});for(A=0;A<l.length;A++){var z=l[A],na=w[z.id];null!=na?null==na.parent&&f.push(a.addCell(na)):z.IsLine&&null!=z.Action&&null!=z.Action.Properties?h(z,z.Action.Properties):null!=z.StrokeStyle&&h(z,z)}if(n&&
+l.push(z)}catch(Pb){console.log(Pb)}if(null!=b.Lines)for(g in b.Lines)0>mxUtils.indexOf(y,g)&&(z=b.Lines[g],z.id=g,l.push(z));l.sort(function(a,b){a=q(a);b=q(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,k=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=k?d-k:0});for(A=0;A<l.length;A++){var z=l[A],na=w[z.id];null!=na?null==na.parent&&f.push(a.addCell(na)):z.IsLine&&null!=z.Action&&null!=z.Action.Properties?h(z,z.Action.Properties):null!=z.StrokeStyle&&h(z,z)}if(n&&
 null!=d&&null!=k){a.isGridEnabled()&&(d=a.snap(d),k=a.snap(k));var C=a.getBoundingBoxFromGeometry(f,!0);null!=C&&a.moveCells(f,d-C.x,k-C.y)}c||a.setSelectionCells(f)}finally{a.getModel().endUpdate()}}function Oa(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function ob(a,b,d,k,n,c,f,w){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);
 c=[a];d=d.clone();w.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);k.push(n.addCell(d,null,null,null,null))}function sa(a,b,d,k,n,c,f,w,l){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;l.insert(a);d=new mxCell("",new mxGeometry(d,k,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;l.insert(d);w=[d];n=n.clone();a.insertEdge(n,!0);d.insertEdge(n,!1);w.push(n);c.push(f.addCell(n,null,null,null,null))}function ga(a,b,d,k,n,f){k.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";
 k.style+=c(k.style,n,f,k);b=g(n);k.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");a.style+=c(a.style,n,f,a,x);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;k.insert(a)}function ka(a,b,d,k,n,f,w,l){n="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+
@@ -41,39 +41,39 @@ k.style+=c(k.style,n,f,k);b=g(n);k.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,
 Z.w),r=Math.round(.6*Z.h),da=Math.round(.6*Z.x+vb),pa=Math.round(.6*Z.y+wb);null==b.Class||"GCPInputDatabase"!==b.Class&&"GCPInputRecord"!==b.Class&&"GCPInputPayment"!==b.Class&&"GCPInputGateway"!==b.Class&&"GCPInputLocalCompute"!==b.Class&&"GCPInputBeacon"!==b.Class&&"GCPInputStorage"!==b.Class&&"GCPInputList"!==b.Class&&"GCPInputStream"!==b.Class&&"GCPInputMobileDevices"!==b.Class&&"GCPInputCircuitBoard"!==b.Class&&"GCPInputLive"!==b.Class&&"GCPInputUsers"!==b.Class&&"GCPInputLaptop"!==b.Class&&
 "GCPInputApplication"!==b.Class&&"GCPInputLightbulb"!==b.Class&&"GCPInputGame"!==b.Class&&"GCPInputDesktop"!==b.Class&&"GCPInputDesktopAndMobile"!==b.Class&&"GCPInputWebcam"!==b.Class&&"GCPInputSpeaker"!==b.Class&&"GCPInputRetail"!==b.Class&&"GCPInputReport"!==b.Class&&"GCPInputPhone"!==b.Class&&"GCPInputBlank"!==b.Class||(r+=20);v=new mxCell("",new mxGeometry(da,pa,t,r),"html=1;whiteSpace=wrap;");v.vertex=!0;var Va=null!=b.Class?b.Class:null!=e?e.Class:null;switch(Va){case "BraceNoteBlock":case "UI2BraceNoteBlock":var bc=
 !1;null!=h.BraceDirection&&"Right"==h.BraceDirection&&(bc=!0);var Oa=null,fa=null;bc?(Oa=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),fa=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(Oa=new mxCell("",new mxGeometry(0,0,.125*r,r),"shape=curlyBracket;rounded=1;flipH=1;"),fa=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,
-v);Oa.vertex=!0;v.insert(Oa);Oa.style+=c(Oa.style,h,e,Oa);fa.vertex=!0;fa.value=g(h);v.insert(fa);fa.style+=c(fa.style,h,e,fa,x);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var wa="MainText",Ob=null,fd="HeaderFill_",Gb="BodyFill_",$b=25,xb=25,ac=0;if(null!=h.Lanes)ac=h.Lanes.length;else if(null!=h.PrimaryLane){for(var cc=
-function(a){if(a)32>a?a=32:208<a&&(a=208);else return 0;return.6*a},ac=h.PrimaryLane.length,m=r=t=0;m<ac;m++)t+=h.PrimaryLane[m];for(m=0;m<h.SecondaryLane.length;m++)r+=h.SecondaryLane[m];$b=cc(h.PrimaryPoolTitleHeight);xb=cc(h.PrimaryLaneTitleHeight);t*=.6;r=.6*r+$b+xb;v.geometry.width=t;v.geometry.height=r;wa="poolPrimaryTitleKey";fd="PrimaryLaneHeaderFill_";Gb="CellFill_0,";Ob=h.PrimaryLaneTextAreaIds;if(null==Ob)for(Ob=[],m=0;m<ac;m++)Ob.push("Primary_"+m)}if(0==h.IsPrimaryLaneVertical){h.Rotation=
--1.5707963267948966;var dc=v.geometry.x,Nc=v.geometry.y}var gd=0!=h.Rotation,Oc=0<Va.indexOf("Pool"),Pc=0==Va.indexOf("BPMN"),Hd=null!=h[wa];v.style=(Oc?"swimlane;startSize="+$b+";":"fillColor=none;strokeColor=none;pointerEvents=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(gd?"horizontalStack=0;":"");v.style+=c(v.style,h,e,v);Hd&&(v.value=g(h[wa]),v.style+=(x?"overflow=width;":a(h[wa])+d(h[wa])+k(h[wa])+w(h[wa],v)+y(h[wa])+A(h[wa])+
-z(h[wa])+B(h[wa]))+C(h[wa])+E(h[wa]));for(var hd=0,qb=[],Id="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;startSize="+xb+";dropTarget=0;rounded=0;"+(gd?"horizontal=0;":"")+(Pc?"swimlaneLine=0;fillColor=none;":""),Q=0;Q<ac;Q++){if(null==Ob)var Qc=parseFloat(h.Lanes[Q].p),m=parseInt(h.Lanes[Q].tid)||Q,Pa="Lane_"+m;else Qc=.6*h.PrimaryLane[Q]/t,m=Q,Pa=Ob[Q];qb.push(new mxCell("",new mxGeometry(t*hd,0,t*Qc,r),Id));qb[Q].vertex=!0;v.insert(qb[Q]);qb[Q].value=g(h[Pa]);qb[Q].style+=
-c(qb[Q].style,h,e,qb[Q],x)+(x?"":a(h[Pa])+d(h[Pa])+k(h[Pa])+w(h[Pa],qb[Q])+y(h[Pa])+A(h[Pa])+z(h[Pa])+B(h[Pa]))+C(h[Pa])+E(h[Pa])+G(h[fd+m])+T(h[Gb+m]);hd+=Qc}null!=dc&&(v.geometry.x=dc,v.geometry.y=Nc);break;case "UMLMultidimensionalSwimlane":var Hb=0,Ib=0,Rc=null,Sc=null;if(null!=h.Rows&&null!=h.Columns)var Hb=h.Rows.length,Ib=h.Columns.length,ec=.6*h.TitleHeight||25,fc=.6*h.TitleWidth||25;else if(null!=h.PrimaryLane&&null!=h.SecondaryLane){Hb=h.SecondaryLane.length;Ib=h.PrimaryLane.length;fc=.6*
-h.SecondaryLaneTitleHeight||25;ec=.6*h.PrimaryLaneTitleHeight||25;for(m=r=t=0;m<Hb;m++)r+=h.SecondaryLane[m];for(m=0;m<Ib;m++)t+=h.PrimaryLane[m];t=.6*t+fc;r=.6*r+ec;v.geometry.width=t;v.geometry.height=r;Rc=h.SecondaryLaneTextAreaIds;Sc=h.PrimaryLaneTextAreaIds}v.style="group;";var Tc=new mxCell("",new mxGeometry(0,ec,t,r-ec),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Tc.vertex=!0;var Uc=
-new mxCell("",new mxGeometry(fc,0,t-fc,r),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Uc.vertex=!0;v.insert(Tc);v.insert(Uc);for(var pa=0,Jd="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;startSize="+fc+";",Q=0;Q<Hb;Q++){if(null==Rc)var Vc=.6*parseInt(h.Rows[Q].height),m=parseInt(h.Rows[Q].id)||Q,Qa="Row_"+m;else Vc=.6*h.SecondaryLane[Q],Qa=Rc[Q];var yb=
-new mxCell("",new mxGeometry(0,pa,t,Vc),Jd),pa=pa+Vc;yb.vertex=!0;Tc.insert(yb);yb.value=g(h[Qa]);yb.style+=c(yb.style,h,e,yb,x)+(x?"":a(h[Qa])+d(h[Qa])+k(h[Qa])+w(h[Qa],yb)+y(h[Qa])+A(h[Qa])+z(h[Qa])+B(h[Qa]))+C(h[Qa])+E(h[Qa])}for(var Kd="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;startSize="+ec+";",Q=da=0;Q<Ib;Q++){if(null==Sc)var Pb=.6*parseInt(h.Columns[Q].width),m=parseInt(h.Columns[Q].id)||Q,Ra="Column_"+m;else Pb=.6*h.PrimaryLane[Q],Ra=Sc[Q];var zb=
-new mxCell("",new mxGeometry(da,0,Pb,r),Kd),da=da+Pb;zb.vertex=!0;Uc.insert(zb);zb.value=g(h[Ra]);zb.style+=c(zb.style,h,e,zb,x)+(x?"":a(h[Ra])+d(h[Ra])+k(h[Ra])+w(h[Ra],zb)+y(h[Ra])+A(h[Ra])+z(h[Ra])+B(h[Ra]))+C(h[Ra])+E(h[Ra])}break;case "AndroidDevice":if(null!=h.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;";var Ab=null,gc=null,hc=null;if("Tablet"==h.AndroidDeviceName||"Mini Tablet"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",Ab=new mxCell("",new mxGeometry(.112*
-t,.077*r,.77*t,.85*r),""),h.KeyboardShown&&(gc=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(hc=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"==h.AndroidDeviceName||"Phone"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",Ab=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.816*r),""),
-h.KeyboardShown&&(gc=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(hc=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));Ab.vertex=!0;v.insert(Ab);"Dark"==h.Scheme?Ab.style+="fillColor=#111111;":"Light"==h.Scheme&&(Ab.style+="fillColor=#ffffff;");null!=gc&&(gc.vertex=!0,v.insert(gc));null!=hc&&(hc.vertex=!0,v.insert(hc))}v.style+=
-c(v.style,h,e,v);break;case "AndroidAlertDialog":var Wa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Wa.vertex=!0;v.insert(Wa);var qa=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");qa.vertex=!0;v.insert(qa);var ic=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;");ic.vertex=!0;v.insert(ic);var ua=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");ua.vertex=!0;v.insert(ua);
-var va=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");va.vertex=!0;v.insert(va);Wa.value=g(h.DialogTitle);Wa.style+=l(h.DialogTitle,x);ic.value=g(h.DialogText);ic.style+=l(h.DialogText,x);ua.value=g(h.Button_0);ua.style+=l(h.Button_0,x);va.value=g(h.Button_1);va.style+=l(h.Button_1,x);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ua.style+="strokeColor=#353535;",va.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",
+v);Oa.vertex=!0;v.insert(Oa);Oa.style+=c(Oa.style,h,e,Oa);fa.vertex=!0;fa.value=g(h);v.insert(fa);fa.style+=c(fa.style,h,e,fa,x);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var wa="MainText",Ob=null,hd="HeaderFill_",Gb="BodyFill_",Pb=25,xb=25,ac=0;if(null!=h.Lanes)ac=h.Lanes.length;else if(null!=h.PrimaryLane){for(var cc=
+function(a){if(a)32>a?a=32:208<a&&(a=208);else return 0;return.6*a},ac=h.PrimaryLane.length,m=r=t=0;m<ac;m++)t+=h.PrimaryLane[m];for(m=0;m<h.SecondaryLane.length;m++)r+=h.SecondaryLane[m];Pb=cc(h.PrimaryPoolTitleHeight);xb=cc(h.PrimaryLaneTitleHeight);t*=.6;r=.6*r+Pb+xb;v.geometry.width=t;v.geometry.height=r;wa="poolPrimaryTitleKey";hd="PrimaryLaneHeaderFill_";Gb="CellFill_0,";Ob=h.PrimaryLaneTextAreaIds;if(null==Ob)for(Ob=[],m=0;m<ac;m++)Ob.push("Primary_"+m)}if(0==h.IsPrimaryLaneVertical){h.Rotation=
+-1.5707963267948966;var dc=v.geometry.x,Pc=v.geometry.y}var Sc=0!=h.Rotation,id=0<Va.indexOf("Pool"),Qc=0==Va.indexOf("BPMN"),Rc=null!=h[wa];v.style=(id?"swimlane;startSize="+Pb+";":"fillColor=none;strokeColor=none;pointerEvents=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Sc?"horizontalStack=0;":"");v.style+=c(v.style,h,e,v);Rc&&(v.value=g(h[wa]),v.style+=(x?"overflow=width;":a(h[wa])+d(h[wa])+k(h[wa])+w(h[wa],v)+y(h[wa])+A(h[wa])+
+z(h[wa])+B(h[wa]))+C(h[wa])+E(h[wa]));for(var jd=0,qb=[],Kd="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;startSize="+xb+";dropTarget=0;rounded=0;"+(Sc?"horizontal=0;":"")+(Qc?"swimlaneLine=0;fillColor=none;":""),Q=h.Rotation=0;Q<ac;Q++){if(null==Ob)var Ec=parseFloat(h.Lanes[Q].p),m=parseInt(h.Lanes[Q].tid)||Q,Pa="Lane_"+m;else Ec=.6*h.PrimaryLane[Q]/t,m=Q,Pa=Ob[Q];var kd=t*jd,Fc=id?Pb:0;qb.push(new mxCell("",Sc?new mxGeometry(Fc,kd,r-Fc,t*Ec):new mxGeometry(kd,Fc,t*Ec,
+r-Fc),Kd));qb[Q].vertex=!0;v.insert(qb[Q]);qb[Q].value=g(h[Pa]);qb[Q].style+=c(qb[Q].style,h,e,qb[Q],x)+(x?"":a(h[Pa])+d(h[Pa])+k(h[Pa])+w(h[Pa],qb[Q])+y(h[Pa])+A(h[Pa])+z(h[Pa])+B(h[Pa]))+C(h[Pa])+E(h[Pa])+G(h[hd+m])+T(h[Gb+m]);jd+=Ec}null!=dc&&(v.geometry.x=dc,v.geometry.y=Pc);break;case "UMLMultidimensionalSwimlane":var Hb=0,Ib=0,Tc=null,Uc=null;if(null!=h.Rows&&null!=h.Columns)var Hb=h.Rows.length,Ib=h.Columns.length,ec=.6*h.TitleHeight||25,fc=.6*h.TitleWidth||25;else if(null!=h.PrimaryLane&&
+null!=h.SecondaryLane){Hb=h.SecondaryLane.length;Ib=h.PrimaryLane.length;fc=.6*h.SecondaryLaneTitleHeight||25;ec=.6*h.PrimaryLaneTitleHeight||25;for(m=r=t=0;m<Hb;m++)r+=h.SecondaryLane[m];for(m=0;m<Ib;m++)t+=h.PrimaryLane[m];t=.6*t+fc;r=.6*r+ec;v.geometry.width=t;v.geometry.height=r;Tc=h.SecondaryLaneTextAreaIds;Uc=h.PrimaryLaneTextAreaIds}v.style="group;";var Vc=new mxCell("",new mxGeometry(0,ec,t,r-ec),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");
+Vc.vertex=!0;var Wc=new mxCell("",new mxGeometry(fc,0,t-fc,r),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Wc.vertex=!0;v.insert(Vc);v.insert(Wc);for(var pa=0,Ld="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;startSize="+fc+";",Q=0;Q<Hb;Q++){if(null==Tc)var Xc=.6*parseInt(h.Rows[Q].height),m=parseInt(h.Rows[Q].id)||Q,Qa="Row_"+m;else Xc=.6*h.SecondaryLane[Q],
+Qa=Tc[Q];var yb=new mxCell("",new mxGeometry(0,pa,t,Xc),Ld),pa=pa+Xc;yb.vertex=!0;Vc.insert(yb);yb.value=g(h[Qa]);yb.style+=c(yb.style,h,e,yb,x)+(x?"":a(h[Qa])+d(h[Qa])+k(h[Qa])+w(h[Qa],yb)+y(h[Qa])+A(h[Qa])+z(h[Qa])+B(h[Qa]))+C(h[Qa])+E(h[Qa])}for(var Md="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;startSize="+ec+";",Q=da=0;Q<Ib;Q++){if(null==Uc)var Qb=.6*parseInt(h.Columns[Q].width),m=parseInt(h.Columns[Q].id)||Q,Ra="Column_"+m;else Qb=.6*h.PrimaryLane[Q],
+Ra=Uc[Q];var zb=new mxCell("",new mxGeometry(da,0,Qb,r),Md),da=da+Qb;zb.vertex=!0;Wc.insert(zb);zb.value=g(h[Ra]);zb.style+=c(zb.style,h,e,zb,x)+(x?"":a(h[Ra])+d(h[Ra])+k(h[Ra])+w(h[Ra],zb)+y(h[Ra])+A(h[Ra])+z(h[Ra])+B(h[Ra]))+C(h[Ra])+E(h[Ra])}break;case "AndroidDevice":if(null!=h.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;";var Ab=null,gc=null,hc=null;if("Tablet"==h.AndroidDeviceName||"Mini Tablet"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",Ab=new mxCell("",
+new mxGeometry(.112*t,.077*r,.77*t,.85*r),""),h.KeyboardShown&&(gc=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(hc=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"==h.AndroidDeviceName||"Phone"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",Ab=new mxCell("",new mxGeometry(.04*t,.092*
+r,.92*t,.816*r),""),h.KeyboardShown&&(gc=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(hc=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));Ab.vertex=!0;v.insert(Ab);"Dark"==h.Scheme?Ab.style+="fillColor=#111111;":"Light"==h.Scheme&&(Ab.style+="fillColor=#ffffff;");null!=gc&&(gc.vertex=!0,v.insert(gc));null!=hc&&(hc.vertex=
+!0,v.insert(hc))}v.style+=c(v.style,h,e,v);break;case "AndroidAlertDialog":var Wa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Wa.vertex=!0;v.insert(Wa);var qa=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");qa.vertex=!0;v.insert(qa);var ic=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;");ic.vertex=!0;v.insert(ic);var ua=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");
+ua.vertex=!0;v.insert(ua);var va=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");va.vertex=!0;v.insert(va);Wa.value=g(h.DialogTitle);Wa.style+=l(h.DialogTitle,x);ic.value=g(h.DialogText);ic.style+=l(h.DialogText,x);ua.value=g(h.Button_0);ua.style+=l(h.Button_0,x);va.value=g(h.Button_1);va.style+=l(h.Button_1,x);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ua.style+="strokeColor=#353535;",va.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",
 ua.style+="strokeColor=#E2E2E2;",va.style+="strokeColor=#E2E2E2;");v.style+=c(v.style,h,e,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":Wa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Wa.vertex=!0;v.insert(Wa);Wa.value=g(h.DialogTitle);Wa.style+=l(h.DialogTitle,x);qa=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");qa.vertex=!0;v.insert(qa);ua=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");ua.vertex=
-!0;v.insert(ua);ua.value=g(h.Button_0);ua.style+=l(h.Button_0,x);va=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");va.vertex=!0;v.insert(va);va.value=g(h.Button_1);va.style+=l(h.Button_1,x);var Qb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");Qb.vertex=!0;v.insert(Qb);var Rb=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;");Rb.vertex=!0;v.insert(Rb);var Sb=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");
-Sb.vertex=!0;v.insert(Sb);var jc=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=g(h.Label_1);jc.style+=l(h.Label_1,x);var kc=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=g(h.Label_0);kc.style+=l(h.Label_0,x);var Tb=null;"AndroidDateDialog"==b.Class&&(Tb=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),Tb.vertex=!0,v.insert(Tb),
-Tb.value=g(h.Label_2),Tb.style+=l(h.Label_2,x));var Xa=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Xa.vertex=!0;v.insert(Xa);var Ya=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Ya.vertex=!0;v.insert(Ya);var id=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");id.vertex=!0;v.insert(id);var lc=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);
-lc.value=g(h.Label_4);lc.style+=l(h.Label_4,x);var Ub=null;"AndroidTimeDialog"==b.Class&&(Ub=new mxCell("",new mxGeometry(.3*t,65,.1*t,15),"strokeColor=none;fillColor=none;"),Ub.vertex=!0,v.insert(Ub),Ub.value=g(h.Label_Colon),Ub.style+=l(h.Label_Colon,x));var mc=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=g(h.Label_3);mc.style+=l(h.Label_3,x);var nc=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");
-nc.vertex=!0;v.insert(nc);nc.value=g(h.Label_5);nc.style+=l(h.Label_5,x);var jd=new mxCell("",new mxGeometry(.43*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");jd.vertex=!0;v.insert(jd);var kd=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");kd.vertex=!0;v.insert(kd);var ld=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");ld.vertex=!0;v.insert(ld);var oc=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");
-oc.vertex=!0;v.insert(oc);oc.value=g(h.Label_7);oc.style+=l(h.Label_7,x);var pc=new mxCell("",new mxGeometry(.125*t,80,.2*t,15),"strokeColor=none;fillColor=none;");pc.vertex=!0;v.insert(pc);pc.value=g(h.Label_6);pc.style+=l(h.Label_6,x);var qc=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");qc.vertex=!0;v.insert(qc);qc.value=g(h.Label_8);qc.style+=l(h.Label_8,x);var Vb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");Vb.vertex=!0;v.insert(Vb);
-var Wb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");Wb.vertex=!0;v.insert(Wb);var Xb=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");Xb.vertex=!0;v.insert(Xb);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ua.style+="strokeColor=#353535;",va.style+="strokeColor=#353535;",Qb.style+="strokeColor=none;fillColor=#7E7E7E;",Rb.style+="strokeColor=none;fillColor=#7E7E7E;",Sb.style+="strokeColor=none;fillColor=#7E7E7E;",
-Vb.style+="strokeColor=none;fillColor=#7E7E7E;",Wb.style+="strokeColor=none;fillColor=#7E7E7E;",Xb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",ua.style+="strokeColor=#E2E2E2;",va.style+="strokeColor=#E2E2E2;",Qb.style+="strokeColor=none;fillColor=#939393;",Rb.style+="strokeColor=none;fillColor=#939393;",Sb.style+="strokeColor=none;fillColor=#939393;",Vb.style+="strokeColor=none;fillColor=#939393;",Wb.style+="strokeColor=none;fillColor=#939393;",
-Xb.style+="strokeColor=none;fillColor=#939393;");v.style+=c(v.style,h,e,v);break;case "AndroidListItems":var Ca=r,rb=0;if(h.ShowHeader){var rb=8,rc=new mxCell("",new mxGeometry(0,0,t,rb),"strokeColor=none;fillColor=none;");rc.vertex=!0;v.insert(rc);rc.value=g(h.Header);rc.style+=l(h.Header,x);var Ca=Ca-rb,md=new mxCell("",new mxGeometry(0,rb-2,t,4),"shape=line;strokeColor=#999999;");md.vertex=!0;v.insert(md)}var Za=parseInt(h.Items);0<Za&&(Ca/=Za);for(var H=[],qa=[],m=0;m<Za;m++)H[m]=new mxCell("",
+!0;v.insert(ua);ua.value=g(h.Button_0);ua.style+=l(h.Button_0,x);va=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");va.vertex=!0;v.insert(va);va.value=g(h.Button_1);va.style+=l(h.Button_1,x);var Rb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");Rb.vertex=!0;v.insert(Rb);var Sb=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;");Sb.vertex=!0;v.insert(Sb);var Tb=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");
+Tb.vertex=!0;v.insert(Tb);var jc=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=g(h.Label_1);jc.style+=l(h.Label_1,x);var kc=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");kc.vertex=!0;v.insert(kc);kc.value=g(h.Label_0);kc.style+=l(h.Label_0,x);var Ub=null;"AndroidDateDialog"==b.Class&&(Ub=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),Ub.vertex=!0,v.insert(Ub),
+Ub.value=g(h.Label_2),Ub.style+=l(h.Label_2,x));var Xa=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Xa.vertex=!0;v.insert(Xa);var Ya=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Ya.vertex=!0;v.insert(Ya);var ld=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");ld.vertex=!0;v.insert(ld);var lc=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");lc.vertex=!0;v.insert(lc);
+lc.value=g(h.Label_4);lc.style+=l(h.Label_4,x);var Vb=null;"AndroidTimeDialog"==b.Class&&(Vb=new mxCell("",new mxGeometry(.3*t,65,.1*t,15),"strokeColor=none;fillColor=none;"),Vb.vertex=!0,v.insert(Vb),Vb.value=g(h.Label_Colon),Vb.style+=l(h.Label_Colon,x));var mc=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");mc.vertex=!0;v.insert(mc);mc.value=g(h.Label_3);mc.style+=l(h.Label_3,x);var nc=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");
+nc.vertex=!0;v.insert(nc);nc.value=g(h.Label_5);nc.style+=l(h.Label_5,x);var md=new mxCell("",new mxGeometry(.43*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");md.vertex=!0;v.insert(md);var nd=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");nd.vertex=!0;v.insert(nd);var od=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");od.vertex=!0;v.insert(od);var oc=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");
+oc.vertex=!0;v.insert(oc);oc.value=g(h.Label_7);oc.style+=l(h.Label_7,x);var pc=new mxCell("",new mxGeometry(.125*t,80,.2*t,15),"strokeColor=none;fillColor=none;");pc.vertex=!0;v.insert(pc);pc.value=g(h.Label_6);pc.style+=l(h.Label_6,x);var qc=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");qc.vertex=!0;v.insert(qc);qc.value=g(h.Label_8);qc.style+=l(h.Label_8,x);var Wb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");Wb.vertex=!0;v.insert(Wb);
+var Xb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");Xb.vertex=!0;v.insert(Xb);var Yb=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");Yb.vertex=!0;v.insert(Yb);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ua.style+="strokeColor=#353535;",va.style+="strokeColor=#353535;",Rb.style+="strokeColor=none;fillColor=#7E7E7E;",Sb.style+="strokeColor=none;fillColor=#7E7E7E;",Tb.style+="strokeColor=none;fillColor=#7E7E7E;",
+Wb.style+="strokeColor=none;fillColor=#7E7E7E;",Xb.style+="strokeColor=none;fillColor=#7E7E7E;",Yb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",ua.style+="strokeColor=#E2E2E2;",va.style+="strokeColor=#E2E2E2;",Rb.style+="strokeColor=none;fillColor=#939393;",Sb.style+="strokeColor=none;fillColor=#939393;",Tb.style+="strokeColor=none;fillColor=#939393;",Wb.style+="strokeColor=none;fillColor=#939393;",Xb.style+="strokeColor=none;fillColor=#939393;",
+Yb.style+="strokeColor=none;fillColor=#939393;");v.style+=c(v.style,h,e,v);break;case "AndroidListItems":var Ca=r,rb=0;if(h.ShowHeader){var rb=8,rc=new mxCell("",new mxGeometry(0,0,t,rb),"strokeColor=none;fillColor=none;");rc.vertex=!0;v.insert(rc);rc.value=g(h.Header);rc.style+=l(h.Header,x);var Ca=Ca-rb,pd=new mxCell("",new mxGeometry(0,rb-2,t,4),"shape=line;strokeColor=#999999;");pd.vertex=!0;v.insert(pd)}var Za=parseInt(h.Items);0<Za&&(Ca/=Za);for(var H=[],qa=[],m=0;m<Za;m++)H[m]=new mxCell("",
 new mxGeometry(0,rb+m*Ca,t,Ca),"strokeColor=none;fillColor=none;"),H[m].vertex=!0,v.insert(H[m]),H[m].value=g(h["Item_"+m]),H[m].style+=l(h["Item_"+m],x),0<m&&(qa[m]=new mxCell("",new mxGeometry(0,rb+m*Ca-2,t,4),"shape=line;"),qa[m].vertex=!0,v.insert(qa[m]),qa[m].style="Dark"==h.Scheme?qa[m].style+"strokeColor=#ffffff;":qa[m].style+"strokeColor=#D9D9D9;");v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);
-break;case "AndroidTabs":var $a=parseInt(h.Tabs),Ia=t;0<$a&&(Ia/=$a);for(var ha=[],qa=[],m=0;m<$a;m++)ha[m]=new mxCell("",new mxGeometry(m*Ia,0,Ia,r),"strokeColor=none;fillColor=none;"),ha[m].vertex=!0,v.insert(ha[m]),ha[m].value=g(h["Tab_"+m]),ha[m].style+=l(h["Tab_"+m],x),0<m&&(qa[m]=new mxCell("",new mxGeometry(m*Ia-2,.2*r,4,.6*r),"shape=line;direction=north;"),qa[m].vertex=!0,v.insert(qa[m]),qa[m].style="Dark"==h.Scheme?qa[m].style+"strokeColor=#484848;":qa[m].style+"strokeColor=#CCCCCC;");var nd=
-new mxCell("",new mxGeometry(h.Selected*Ia+2,r-3,Ia-4,3),"strokeColor=none;fillColor=#33B5E5;");nd.vertex=!0;v.insert(nd);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=c(v.style,h,e,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(da),Math.round(pa+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var sc=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*
+break;case "AndroidTabs":var $a=parseInt(h.Tabs),Ia=t;0<$a&&(Ia/=$a);for(var ha=[],qa=[],m=0;m<$a;m++)ha[m]=new mxCell("",new mxGeometry(m*Ia,0,Ia,r),"strokeColor=none;fillColor=none;"),ha[m].vertex=!0,v.insert(ha[m]),ha[m].value=g(h["Tab_"+m]),ha[m].style+=l(h["Tab_"+m],x),0<m&&(qa[m]=new mxCell("",new mxGeometry(m*Ia-2,.2*r,4,.6*r),"shape=line;direction=north;"),qa[m].vertex=!0,v.insert(qa[m]),qa[m].style="Dark"==h.Scheme?qa[m].style+"strokeColor=#484848;":qa[m].style+"strokeColor=#CCCCCC;");var qd=
+new mxCell("",new mxGeometry(h.Selected*Ia+2,r-3,Ia-4,3),"strokeColor=none;fillColor=#33B5E5;");qd.vertex=!0;v.insert(qd);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=c(v.style,h,e,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(da),Math.round(pa+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var sc=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*
 r)),"strokeColor=none;fillColor=#33B5E5;");sc.vertex=!0;v.insert(sc);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=c(v.style,h,e,v);break;case "AndroidImageBlock":v.style="Dark"==h.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);break;case "AndroidTextBlock":v.style=
 "Dark"==h.Scheme?h.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":h.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=g(h.Label);v.style+=l(h.Label,x);v.style+=c(v.style,h,e,v,x);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(h.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";break;case "Dark Gray":v.style+=
-"fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(h.HighlightShow){var sb=null,sb=h.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");sb.vertex=!0;v.insert(sb);switch(h.HighlightColor){case "Blue":sb.style+="fillColor=#33B5E5;";break;case "Dark Gray":sb.style+="fillColor=#B0B0B0;";break;case "White":sb.style+="fillColor=#ffffff;"}}if(h.VlignShow){var Yb=new mxCell("",new mxGeometry(20,5,2,r-10),
-"shape=line;direction=north;");Yb.vertex=!0;v.insert(Yb);switch(h.VlignColor){case "Blue":Yb.style+="strokeColor=#244C5A;";break;case "White":Yb.style+="strokeColor=#ffffff;"}}v.style+=c(v.style,h,e,v);break;case "AndroidButton":v.value=g(h.Label);v.style+=l(h.Label,x)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==h.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=c(v.style,h,e,v);break;case "AndroidTextBox":v.value=
+"fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(h.HighlightShow){var sb=null,sb=h.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");sb.vertex=!0;v.insert(sb);switch(h.HighlightColor){case "Blue":sb.style+="fillColor=#33B5E5;";break;case "Dark Gray":sb.style+="fillColor=#B0B0B0;";break;case "White":sb.style+="fillColor=#ffffff;"}}if(h.VlignShow){var Zb=new mxCell("",new mxGeometry(20,5,2,r-10),
+"shape=line;direction=north;");Zb.vertex=!0;v.insert(Zb);switch(h.VlignColor){case "Blue":Zb.style+="strokeColor=#244C5A;";break;case "White":Zb.style+="strokeColor=#ffffff;"}}v.style+=c(v.style,h,e,v);break;case "AndroidButton":v.value=g(h.Label);v.style+=l(h.Label,x)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==h.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=c(v.style,h,e,v);break;case "AndroidTextBox":v.value=
 g(h.Label);v.style+=l(h.Label,x);var tc=new mxCell("",new mxGeometry(2,r-6,t-4,4),"shape=partialRectangle;top=0;fillColor=none;");tc.vertex=!0;v.insert(tc);v.style="Dark"==h.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";tc.style=h.TextFocused?tc.style+"strokeColor=#33B5E5;":tc.style+"strokeColor=#A9A9A9;";v.style+=c(v.style,h,e,v);break;case "AndroidRadioButton":var Jb=null;h.Checked&&(Jb=new mxCell("",new mxGeometry(.15*t,.15*r,.7*t,.7*r),"shape=ellipse;fillColor=#33B5E5;strokeWidth=1;"),
-Jb.vertex=!0,v.insert(Jb));"Dark"==h.Scheme?(v.style+="shape=ellipse;strokeWidth=1;strokeColor=#272727;",h.Checked?(Jb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",h.Checked&&(Jb.style+="strokeColor=#999999;"));v.style+=c(v.style,h,e,v);break;case "AndroidCheckBox":var Wc=null;h.Checked&&(Wc=new mxCell("",new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),
-Wc.vertex=!0,v.insert(Wc));v.style="Dark"==h.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);break;case "AndroidToggle":v.style="Dark"==h.Scheme?h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";
+Jb.vertex=!0,v.insert(Jb));"Dark"==h.Scheme?(v.style+="shape=ellipse;strokeWidth=1;strokeColor=#272727;",h.Checked?(Jb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",h.Checked&&(Jb.style+="strokeColor=#999999;"));v.style+=c(v.style,h,e,v);break;case "AndroidCheckBox":var Yc=null;h.Checked&&(Yc=new mxCell("",new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),
+Yc.vertex=!0,v.insert(Yc));v.style="Dark"==h.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);break;case "AndroidToggle":v.style="Dark"==h.Scheme?h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";
 v.style+=c(v.style,h,e,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+h.BarPosition+";fillColor=#33b5e5;";v.style+=c(v.style,h,e,v);break;case "iOSSegmentedControl":$a=parseInt(h.Tabs);Ia=t;v.style+="strokeColor=none;fillColor=none;";0<$a&&(Ia/=$a);ha=[];qa=[];for(m=0;m<$a;m++)ha[m]=new mxCell("",new mxGeometry(m*Ia,0,Ia,r),"strokeColor="+h.FillColor+";"),ha[m].vertex=!0,v.insert(ha[m]),ha[m].value=g(h["Tab_"+m]),ha[m].style+=l(h["Tab_"+m],x),ha[m].style=
 h.Selected==m?ha[m].style+O(h,e):ha[m].style+"fillColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+h.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*h.BarPosition+";";v.style+=c(v.style,h,e,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(da),Math.round(pa+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;sc=new mxCell("",new mxGeometry(0,
 0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;"+O(h,e));sc.vertex=!0;v.insert(sc);v.style+=c(v.style,h,e,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=c(v.style,h,e,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var U=new mxCell(g(h.Text),new mxGeometry(.35*t,0,.3*t,r),"strokeColor=none;fillColor=none;");U.vertex=!0;v.insert(U);U.style+=l(h.Text,x);var Ea=new mxCell(g(h.Carrier),new mxGeometry(.09*
@@ -131,11 +131,11 @@ break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+=
 0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");p.geometry.offset=new mxPoint(3,3);p.style+=O(h,e)+D(h,e);p.geometry.relative=!0;p.vertex=!0;v.insert(p);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";U=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;");U.geometry.offset=new mxPoint(0,14);U.geometry.relative=!0;U.vertex=!0;v.insert(U);U.value=g(h.Text);U.style+=l(h,x);break;case 3:p=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),
 p.geometry.offset=new mxPoint(3,3),p.style+=D(h,e),p.geometry.relative=!0,p.vertex=!0,v.insert(p),I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),p.style+=I,U=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;"),U.geometry.offset=new mxPoint(0,14),U.geometry.relative=!0,U.vertex=!0,v.insert(U),U.value=g(h.Text),U.style+=l(h,x)}v.style+=c(v.style,h,e,v);break;case "BPMNBlackPool":v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,
 0,t,r),"fillColor=#000000;strokeColor=none;opacity=30;");p.vertex=!0;v.insert(p);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);p=new mxCell("",new mxGeometry(0,0,.95*t,.95*r),"part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.05*t,.05*r,.95*t,.95*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=l(h.Text,x);u.style+=c(u.style,h,e,u,x);break;case "GSDFDDataStoreBlock":v.value=g(h.Text);
-v.style+="shape=partialRectangle;right=0;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,.2*t,r),"part=1;");p.vertex=!0;v.insert(p);p.value=g(h.Number);p.style+=l(h.Number,x);p.style+=c(p.style,h,e,p,x);break;case "DefaultTableBlock":try{for(var Hb=h.RowHeights.length,Ib=h.ColWidths.length,Ec=[],vc=[],m=0;m<Hb;m++)Ec[m]=.6*h.RowHeights[m];for(Q=0;Q<Ib;Q++)vc[Q]=.6*h.ColWidths[Q];v.style="group;dropTarget=0;";var Xc=h.BandedColor1,Yc=h.BandedColor2,Ld=h.BandedRows,od=h.BandedCols,
-Fc=h.HideH,Md=h.HideV,pd=h.TextVAlign,qd=h.FillColor,rd=h.StrokeStyle;delete h.StrokeStyle;for(var Nd=ea(qd,"fillOpacity"),sd=h.LineColor,Od=ea(sd,"strokeOpacity"),pa=0,wc={},m=0;m<Hb;m++){da=0;r=Ec[m];for(Q=0;Q<Ib;Q++){var Ma=m+","+Q;if(wc[Ma])da+=vc[Q];else{for(var Gc=h["CellFill_"+Ma],Zc=h["NoBand_"+Ma],Hc=h["CellSize_"+Ma],mb=h["Cell_"+Ma],td=h["Cell_"+Ma+"_VAlign"],Pd=h["Cell_"+Ma+"_TRotation"],Qd=h["CellBorderWidthH_"+Ma],Rd=h["CellBorderColorH_"+Ma],Sd=h["CellBorderStrokeStyleH_"+Ma],Td=h["CellBorderWidthV_"+
-Ma],Ud=h["CellBorderColorV_"+Ma],Vd=h["CellBorderStrokeStyleV_"+Ma],ud=Fc?Ud:Rd,vd=ea(ud,"strokeOpacity"),wd=Fc?Td:Qd,xd=Fc?Vd:Sd,Gc=Ld&&!Zc?0==m%2?Xc:od&&!Zc?0==Q%2?Xc:Yc:Yc:od&&!Zc?0==Q%2?Xc:Yc:Gc,Wd=ea(Gc,"fillOpacity")||Nd,t=vc[Q],yd=r,Pb=t,Ta=m+1;Ta<m+Hc.h;Ta++)if(null!=Ec[Ta]){yd+=Ec[Ta];wc[Ta+","+Q]=!0;for(var Lb=Q+1;Lb<Q+Hc.w;Lb++)wc[Lb+","+Q]=!0}for(Ta=Q+1;Ta<Q+Hc.w;Ta++)if(null!=vc[Ta])for(Pb+=vc[Ta],wc[m+","+Ta]=!0,Lb=m+1;Lb<m+Hc.h;Lb++)wc[Lb+","+Ta]=!0;var R=new mxCell("",new mxGeometry(da,
-pa,Pb,yd),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Md?"left=0;right=0;":"")+(Fc?"top=0;bottom=0;":"")+nb(mxConstants.STYLE_FILLCOLOR,ba(Gc),ba(qd))+nb(mxConstants.STYLE_STROKECOLOR,ba(ud),ba(sd))+(null!=wd?nb(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(wd)),"1"):"")+(vd?vd:Od)+Wd+"verticalAlign="+(td?td:pd?pd:"middle")+";"+ma({StrokeStyle:xd?xd:rd?rd:"solid"})+(Pd?"horizontal=0;":""));R.vertex=!0;R.value=g(mb);R.style+=c(R.style,h,e,R,x)+(x?"":a(mb)+d(mb)+k(mb)+w(mb,
-R)+y(mb)+A(mb)+z(mb)+B(mb))+C(mb)+E(mb);v.insert(R);da+=t}}pa+=r}}catch(Gd){}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==b.Class?v.value=g(h.Text):"VSMProductionControlBlock"==b.Class&&(v.value=g(h.Resources));v.style+=c(v.style,h,e,v,x);"VSMDedicatedProcessBlock"==b.Class&&(p=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),p.geometry.relative=
+v.style+="shape=partialRectangle;right=0;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,.2*t,r),"part=1;");p.vertex=!0;v.insert(p);p.value=g(h.Number);p.style+=l(h.Number,x);p.style+=c(p.style,h,e,p,x);break;case "DefaultTableBlock":try{for(var Hb=h.RowHeights.length,Ib=h.ColWidths.length,Gc=[],vc=[],m=0;m<Hb;m++)Gc[m]=.6*h.RowHeights[m];for(Q=0;Q<Ib;Q++)vc[Q]=.6*h.ColWidths[Q];v.style="group;dropTarget=0;";var Zc=h.BandedColor1,$c=h.BandedColor2,Nd=h.BandedRows,rd=h.BandedCols,
+Hc=h.HideH,Od=h.HideV,sd=h.TextVAlign,td=h.FillColor,ud=h.StrokeStyle;delete h.StrokeStyle;for(var Pd=ea(td,"fillOpacity"),vd=h.LineColor,Qd=ea(vd,"strokeOpacity"),pa=0,wc={},m=0;m<Hb;m++){da=0;r=Gc[m];for(Q=0;Q<Ib;Q++){var Ma=m+","+Q;if(wc[Ma])da+=vc[Q];else{for(var Ic=h["CellFill_"+Ma],ad=h["NoBand_"+Ma],Jc=h["CellSize_"+Ma],mb=h["Cell_"+Ma],wd=h["Cell_"+Ma+"_VAlign"],Rd=h["Cell_"+Ma+"_TRotation"],Sd=h["CellBorderWidthH_"+Ma],Td=h["CellBorderColorH_"+Ma],Ud=h["CellBorderStrokeStyleH_"+Ma],Vd=h["CellBorderWidthV_"+
+Ma],Wd=h["CellBorderColorV_"+Ma],Xd=h["CellBorderStrokeStyleV_"+Ma],xd=Hc?Wd:Td,yd=ea(xd,"strokeOpacity"),zd=Hc?Vd:Sd,Ad=Hc?Xd:Ud,Ic=Nd&&!ad?0==m%2?Zc:rd&&!ad?0==Q%2?Zc:$c:$c:rd&&!ad?0==Q%2?Zc:$c:Ic,Yd=ea(Ic,"fillOpacity")||Pd,t=vc[Q],Bd=r,Qb=t,Ta=m+1;Ta<m+Jc.h;Ta++)if(null!=Gc[Ta]){Bd+=Gc[Ta];wc[Ta+","+Q]=!0;for(var Lb=Q+1;Lb<Q+Jc.w;Lb++)wc[Lb+","+Q]=!0}for(Ta=Q+1;Ta<Q+Jc.w;Ta++)if(null!=vc[Ta])for(Qb+=vc[Ta],wc[m+","+Ta]=!0,Lb=m+1;Lb<m+Jc.h;Lb++)wc[Lb+","+Ta]=!0;var R=new mxCell("",new mxGeometry(da,
+pa,Qb,Bd),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Od?"left=0;right=0;":"")+(Hc?"top=0;bottom=0;":"")+nb(mxConstants.STYLE_FILLCOLOR,ba(Ic),ba(td))+nb(mxConstants.STYLE_STROKECOLOR,ba(xd),ba(vd))+(null!=zd?nb(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(zd)),"1"):"")+(yd?yd:Qd)+Yd+"verticalAlign="+(wd?wd:sd?sd:"middle")+";"+ma({StrokeStyle:Ad?Ad:ud?ud:"solid"})+(Rd?"horizontal=0;":""));R.vertex=!0;R.value=g(mb);R.style+=c(R.style,h,e,R,x)+(x?"":a(mb)+d(mb)+k(mb)+w(mb,
+R)+y(mb)+A(mb)+z(mb)+B(mb))+C(mb)+E(mb);v.insert(R);da+=t}}pa+=r}}catch(Jd){}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==b.Class?v.value=g(h.Text):"VSMProductionControlBlock"==b.Class&&(v.value=g(h.Resources));v.style+=c(v.style,h,e,v,x);"VSMDedicatedProcessBlock"==b.Class&&(p=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),p.geometry.relative=
 !0,p.geometry.offset=new mxPoint(4,-13),p.vertex=!0,v.insert(p),p.style+=c(p.style,h,e,p));U=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");U.vertex=!0;v.insert(U);U.value=g(h.Title);U.style+=l(h.Title,x);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);U=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");U.vertex=!0;v.insert(U);
 U.value=g(h.Resource);U.style+=l(h.Resource,x);U.style+=c(U.style,h,e,U,x);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);var Ca=r,Za=parseInt(h.Cells),N=c("part=1;",h,e,v);0<Za&&(Ca/=Za);H=[];qa=[];for(m=1;m<=Za;m++)H[m]=new mxCell("",new mxGeometry(0,(m-1)*
 Ca,t,Ca),N),H[m].vertex=!0,v.insert(H[m]),H[m].value=g(h["cell_"+m]),H[m].style+=l(h["cell_"+m],x);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);Ca=r;Za=parseInt(h.Cells);N=c("part=1;fillColor=none;",h,e,v);0<Za&&(Ca/=Za);H=[];Sa=[];for(m=1;m<=Za;m++)H[m]=new mxCell("",new mxGeometry(.5*
@@ -159,7 +159,7 @@ b.Class&&(p=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=
 v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,.07*r,.21*t,.86*r),"fillColor=#FFFF33;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.26*t,.09*r,.2*t,.82*r),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(1,.5,.35*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");F.geometry.relative=!0;F.geometry.offset=new mxPoint(.4*
 -t,-10);F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");K.geometry.relative=!0;K.edge=!0;p.insertEdge(K,!0);u.insertEdge(K,!1);K.style+=D(h,e);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");
 J.geometry.relative=!0;J.edge=!0;u.insertEdge(J,!0);F.insertEdge(J,!1);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var yc=
-h.Messages,$c=(r-17)/yc,u=[],V=[],m=0;m<yc;m++){var zc=$c*(m+1)-3;u[m]=new mxCell("",new mxGeometry(t-20,zc,20,20),"part=1;");u[m].vertex=!0;v.insert(u[m]);switch(b.Class){case "EIMessageBlock":u[m].value=g(h["message_"+(m+1)]);u.style+=l(h["message_"+(m+1)],x);break;case "EICommandMessageBlock":u[m].value="C";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":u[m].value="D";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":u[m].value="E",u[m].style+=
+h.Messages,bd=(r-17)/yc,u=[],V=[],m=0;m<yc;m++){var zc=bd*(m+1)-3;u[m]=new mxCell("",new mxGeometry(t-20,zc,20,20),"part=1;");u[m].vertex=!0;v.insert(u[m]);switch(b.Class){case "EIMessageBlock":u[m].value=g(h["message_"+(m+1)]);u.style+=l(h["message_"+(m+1)],x);break;case "EICommandMessageBlock":u[m].value="C";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":u[m].value="D";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":u[m].value="E",u[m].style+=
 "fontStyle=1;fontSize=11;"}u[m].style+=c(u[m].style,h,e,u[m]);V[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");V[m].geometry.relative=!0;V[m].edge=!0;p.insertEdge(V[m],!1);u[m].insertEdge(V[m],!0);V[m].style+=c(V[m].style,h,e,V[m]);var Bb=[];Bb.push(new mxPoint(da+8.5,pa+zc+10));V[m].geometry.points=Bb;n.push(f.addCell(V[m],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
 v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.45*t,.25*r,.3*t,.5*r),"part=1;fillColor=#ffffff");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);V=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");V.geometry.relative=!0;V.edge=!0;sa(0,.5*r,.4*t,.5*r,V,n,f,ca,v,R);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
 v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;sa(.05*t,.5*r,.85*t,.5*r,K,n,f,ca,v,R);var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;sa(.05*t,.5*r,.85*t,.15*
@@ -170,25 +170,25 @@ x);p=new mxCell("",new mxGeometry(.2*t,.21*r,.16*t,.24*r),"part=1;fillColor=#fff
 new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;sa(.55*t,.67*r,.2*t,.67*r,J,n,f,ca,v,R);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.1*t,.15*r,.8*t,.7*r),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");p.vertex=!0;v.insert(p);p.style+=
 c(p.style,h,e,p);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.04*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.2*t,.56*r,.2*t,.32*r),"part=1;");u.vertex=!0;v.insert(u);u.value="A";u.style+="fontStyle=1;fontSize=11;";p.style+=c(p.style,h,e,p);K=new mxCell("",new mxGeometry(0,
 0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");K.geometry.relative=!0;K.edge=!0;p.insertEdge(K,!1);u.insertEdge(K,!0);K.style+=c(K.style,h,e,K);Bb=[];Bb.push(new mxPoint(da+.13*t,pa+.72*r));K.geometry.points=Bb;n.push(f.addCell(K,null,null,null,null));F=new mxCell("",new mxGeometry(.6*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");F.vertex=!0;v.insert(F);F.style+=D(h,e)+ia(h);F.style+=c(F.style,h,e,F);P=new mxCell("",new mxGeometry(.76*
-t,.56*r,.2*t,.32*r),"part=1;");P.vertex=!0;v.insert(P);P.style+=D(h,e)+M(h,e,P)+ia(h)+ma(h);P.value="B";P.style+="fontStyle=1;fontSize=11;fillColor=#ffffff;";P.style+=c(P.style,h,e,P);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");J.geometry.relative=!0;J.edge=!0;F.insertEdge(J,!1);P.insertEdge(J,!0);J.style+=c(J.style,h,e,J);var zd=[];zd.push(new mxPoint(da+.69*t,pa+.72*r));J.geometry.points=zd;n.push(f.addCell(J,
+t,.56*r,.2*t,.32*r),"part=1;");P.vertex=!0;v.insert(P);P.style+=D(h,e)+M(h,e,P)+ia(h)+ma(h);P.value="B";P.style+="fontStyle=1;fontSize=11;fillColor=#ffffff;";P.style+=c(P.style,h,e,P);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");J.geometry.relative=!0;J.edge=!0;F.insertEdge(J,!1);P.insertEdge(J,!0);J.style+=c(J.style,h,e,J);var Cd=[];Cd.push(new mxPoint(da+.69*t,pa+.72*r));J.geometry.points=Cd;n.push(f.addCell(J,
 null,null,null,null));S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");S.geometry.relative=!0;S.edge=!0;p.insertEdge(S,!1);F.insertEdge(S,!0);S.style+=c(S.style,h,e,S);n.push(f.addCell(S,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("1",new mxGeometry(.2*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");
 p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("2",new mxGeometry(.45*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("3",new mxGeometry(.7*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");p.insertEdge(K,!1);u.insertEdge(K,!0);K.geometry.points=
 [new mxPoint(da+.375*t,pa+.15*r)];K.geometry.relative=!0;K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");u.insertEdge(J,!1);F.insertEdge(J,!0);J.geometry.points=[new mxPoint(da+.675*t,pa+.15*r)];J.geometry.relative=!0;J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
 v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.3*t,.2*r,.4*t,.6*r),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.38*t,.42*r,.24*t,.16*r),"part=1;fillColor=#aefe7d;");p.vertex=!0;v.insert(p);p.style+=
-c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.38*t,0,.24*t,.16*r),"part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(.76*t,.23*r,.24*t,.16*r),"");F.vertex=!0;v.insert(F);F.style=u.style;var P=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");P.vertex=!0;v.insert(P);P.style=u.style;var Ic=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");Ic.vertex=!0;v.insert(Ic);Ic.style=u.style;var Jc=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),"");
-Jc.vertex=!0;v.insert(Jc);Jc.style=u.style;var Kc=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");Kc.vertex=!0;v.insert(Kc);Kc.style=u.style;K=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(K,!1);u.insertEdge(K,!0);K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(J,!1);F.insertEdge(J,!0);J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null));
-S=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(S,!1);P.insertEdge(S,!0);S.edge=!0;S.style+=c(S.style,h,e,S);n.push(f.addCell(S,null,null,null,null));la=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(la,!1);Ic.insertEdge(la,!0);la.edge=!0;la.style+=c(la.style,h,e,la);n.push(f.addCell(la,null,null,null,null));var Cb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(Cb,!1);Jc.insertEdge(Cb,!0);Cb.edge=!0;Cb.style+=
-c(Cb.style,h,e,Cb);n.push(f.addCell(Cb,null,null,null,null));var Db=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(Db,!1);Kc.insertEdge(Db,!0);Db.edge=!0;Db.style+=c(Db.style,h,e,Db);n.push(f.addCell(Db,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");
+c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.38*t,0,.24*t,.16*r),"part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(.76*t,.23*r,.24*t,.16*r),"");F.vertex=!0;v.insert(F);F.style=u.style;var P=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");P.vertex=!0;v.insert(P);P.style=u.style;var Kc=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");Kc.vertex=!0;v.insert(Kc);Kc.style=u.style;var Lc=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),"");
+Lc.vertex=!0;v.insert(Lc);Lc.style=u.style;var Mc=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");Mc.vertex=!0;v.insert(Mc);Mc.style=u.style;K=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(K,!1);u.insertEdge(K,!0);K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(J,!1);F.insertEdge(J,!0);J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null));
+S=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(S,!1);P.insertEdge(S,!0);S.edge=!0;S.style+=c(S.style,h,e,S);n.push(f.addCell(S,null,null,null,null));la=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(la,!1);Kc.insertEdge(la,!0);la.edge=!0;la.style+=c(la.style,h,e,la);n.push(f.addCell(la,null,null,null,null));var Cb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(Cb,!1);Lc.insertEdge(Cb,!0);Cb.edge=!0;Cb.style+=
+c(Cb.style,h,e,Cb);n.push(f.addCell(Cb,null,null,null,null));var Db=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(Db,!1);Mc.insertEdge(Db,!0);Db.edge=!0;Db.style+=c(Db.style,h,e,Db);n.push(f.addCell(Db,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");
 K.geometry.relative=!0;K.edge=!0;sa(.05*t,.5*r,.6*t,.25*r,K,n,f,ca,v,R);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;sa(.05*t,.5*r,.6*t,.75*r,J,n,f,ca,v,R);p=new mxCell("",new mxGeometry(.7*t,.1*r,.15*t,.32*r),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
 v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"shape=mxgraph.eip.control_bus;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);F=new mxCell("",
 new mxGeometry(t-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");S.geometry.relative=!0;S.edge=!0;p.insertEdge(S,!1);F.insertEdge(S,!0);S.style+=c(S.style,h,e,S);S.geometry.points=[new mxPoint(da+8.5,pa+40)];n.push(f.addCell(S,null,null,null,null));P=new mxCell("",new mxGeometry(t-45,r-20,20,
-20),"part=1;");P.vertex=!0;v.insert(P);P.value=g(h.message_0);P.style+=l(h.message_0,x);P.style+=c(P.style,h,e,P,x);la=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");la.geometry.relative=!0;la.edge=!0;p.insertEdge(la,!1);P.insertEdge(la,!0);la.style+=c(la.style,h,e,la);la.geometry.points=[new mxPoint(da+8.5,pa+r-10)];n.push(f.addCell(la,null,null,null,null));yc=h.HistoryMessages;$c=(r-75)/yc;u=[];V=[];for(m=0;m<yc;m++)zc=
-$c*(m+1)+30,u[m]=new mxCell("",new mxGeometry(t-20,zc,20,20),"part=1;"),u[m].vertex=!0,u[m].value=g(h["message_"+(m+1)]),u.style+=l(h["message_"+(m+1)],x),v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m],x),V[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),V[m].geometry.relative=!0,V[m].edge=!0,F.insertEdge(V[m],!1),u[m].insertEdge(V[m],!0),V[m].style+=c(V[m].style,h,e,V[m]),Bb=[],Bb.push(new mxPoint(da+t-30,pa+zc+
+20),"part=1;");P.vertex=!0;v.insert(P);P.value=g(h.message_0);P.style+=l(h.message_0,x);P.style+=c(P.style,h,e,P,x);la=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");la.geometry.relative=!0;la.edge=!0;p.insertEdge(la,!1);P.insertEdge(la,!0);la.style+=c(la.style,h,e,la);la.geometry.points=[new mxPoint(da+8.5,pa+r-10)];n.push(f.addCell(la,null,null,null,null));yc=h.HistoryMessages;bd=(r-75)/yc;u=[];V=[];for(m=0;m<yc;m++)zc=
+bd*(m+1)+30,u[m]=new mxCell("",new mxGeometry(t-20,zc,20,20),"part=1;"),u[m].vertex=!0,u[m].value=g(h["message_"+(m+1)]),u.style+=l(h["message_"+(m+1)],x),v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m],x),V[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),V[m].geometry.relative=!0,V[m].edge=!0,F.insertEdge(V[m],!1),u[m].insertEdge(V[m],!0),V[m].style+=c(V[m].style,h,e,V[m]),Bb=[],Bb.push(new mxPoint(da+t-30,pa+zc+
 10)),V[m].geometry.points=Bb,n.push(f.addCell(V[m],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);p=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");p.vertex=
-!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var u=[],Ad=.02*t,ad=(t-2*Ad)/h.LightCount,Bd=.8*ad,m=0;m<h.LightCount;m++)u[m]=new mxCell("",new mxGeometry(Ad+ad*m+(ad-Bd)/2,.25*r,Bd,.75*r),"part=1;shape=ellipse;"),u[m].vertex=!0,v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);for(var p=[],Cd=t/h.SinkCount,m=0;m<h.SinkCount;m++)p[m]=new mxCell("",new mxGeometry(Cd*m,0,Cd,r),"part=1;shape=mxgraph.floorplan.sink_2;"),
-p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Ga=.1*t/h.StallCount,p=new mxCell("",new mxGeometry(0,0,Ga,r),"fillColor=#000000;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var Na=(t-Ga)/h.StallCount,bd=[],Ac=[],Bc=[],Cc=[],I=D(h,e),I=""==I?"#000000;":I.replace("stokreColor=",""),Lc="part=1;fillColor="+I,Lc=Lc+c(Lc,h,e,v),cd=c("",h,e,v),m=0;m<h.StallCount;m++)bd[m]=new mxCell("",new mxGeometry((m+
-1)*Na,0,Ga,r),Lc),bd[m].vertex=!0,v.insert(bd[m]),Bc[m]=new mxCell("",new mxGeometry(Ga+m*Na+.05*(Na-Ga),r-.92*(Na-Ga),.9*(Na-Ga),.92*(Na-Ga)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Bc[m].vertex=!0,v.insert(Bc[m]),Bc[m].style+=cd,Ac[m]=new mxCell("",new mxGeometry(Ga+m*Na+.2*(Na-Ga),0,.6*(Na-Ga),.8*(Na-Ga)),"shape=mxgraph.floorplan.toilet;part=1;"),Ac[m].vertex=!0,v.insert(Ac[m]),Ac[m].style+=cd,Cc[m]=new mxCell("",new mxGeometry(Ga+m*Na,.42*r,.15*(Na-Ga),.12*(Na-Ga)),"part=1;"),Cc[m].vertex=
-!0,v.insert(Cc[m]),Cc[m].style+=cd;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Ua="edgeStyle=none;endArrow=none;part=1;";Ua.style+=c(Ua.style,h,e,Ua);var I=D(h,e),I=""==I?"#000000;":I.replace("strokeColor=",""),Eb="shape=triangle;part=1;fillColor="+I,Eb=Eb+c(Eb,h,e,v),K=new mxCell("",new mxGeometry(0,0,0,0),Ua);K.geometry.relative=!0;K.edge=!0;sa(0,.5*r,.65*t,.5*r,K,n,f,ca,v,R);for(var L=r/h.numLines,J=[],Mb=[],m=0;m<h.numLines;m++)J[m]=new mxCell("",new mxGeometry(0,
+!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var u=[],Dd=.02*t,cd=(t-2*Dd)/h.LightCount,Ed=.8*cd,m=0;m<h.LightCount;m++)u[m]=new mxCell("",new mxGeometry(Dd+cd*m+(cd-Ed)/2,.25*r,Ed,.75*r),"part=1;shape=ellipse;"),u[m].vertex=!0,v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);for(var p=[],Fd=t/h.SinkCount,m=0;m<h.SinkCount;m++)p[m]=new mxCell("",new mxGeometry(Fd*m,0,Fd,r),"part=1;shape=mxgraph.floorplan.sink_2;"),
+p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Ga=.1*t/h.StallCount,p=new mxCell("",new mxGeometry(0,0,Ga,r),"fillColor=#000000;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var Na=(t-Ga)/h.StallCount,dd=[],Ac=[],Bc=[],Cc=[],I=D(h,e),I=""==I?"#000000;":I.replace("stokreColor=",""),Nc="part=1;fillColor="+I,Nc=Nc+c(Nc,h,e,v),ed=c("",h,e,v),m=0;m<h.StallCount;m++)dd[m]=new mxCell("",new mxGeometry((m+
+1)*Na,0,Ga,r),Nc),dd[m].vertex=!0,v.insert(dd[m]),Bc[m]=new mxCell("",new mxGeometry(Ga+m*Na+.05*(Na-Ga),r-.92*(Na-Ga),.9*(Na-Ga),.92*(Na-Ga)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Bc[m].vertex=!0,v.insert(Bc[m]),Bc[m].style+=ed,Ac[m]=new mxCell("",new mxGeometry(Ga+m*Na+.2*(Na-Ga),0,.6*(Na-Ga),.8*(Na-Ga)),"shape=mxgraph.floorplan.toilet;part=1;"),Ac[m].vertex=!0,v.insert(Ac[m]),Ac[m].style+=ed,Cc[m]=new mxCell("",new mxGeometry(Ga+m*Na,.42*r,.15*(Na-Ga),.12*(Na-Ga)),"part=1;"),Cc[m].vertex=
+!0,v.insert(Cc[m]),Cc[m].style+=ed;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Ua="edgeStyle=none;endArrow=none;part=1;";Ua.style+=c(Ua.style,h,e,Ua);var I=D(h,e),I=""==I?"#000000;":I.replace("strokeColor=",""),Eb="shape=triangle;part=1;fillColor="+I,Eb=Eb+c(Eb,h,e,v),K=new mxCell("",new mxGeometry(0,0,0,0),Ua);K.geometry.relative=!0;K.edge=!0;sa(0,.5*r,.65*t,.5*r,K,n,f,ca,v,R);for(var L=r/h.numLines,J=[],Mb=[],m=0;m<h.numLines;m++)J[m]=new mxCell("",new mxGeometry(0,
 0,0,0),Ua),J[m].geometry.relative=!0,J[m].edge=!0,sa(.65*t,.5*r,.96*t,(m+.5)*L,J[m],n,f,ca,v,R),Mb[m]=new mxCell("",new mxGeometry(.95*t,(m+.2)*L,.05*t,.6*L),Eb),Mb[m].vertex=!0,v.insert(Mb[m]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";Ua="edgeStyle=none;endArrow=none;part=1;";Ua.style+=c(Ua.style,h,e,Ua);I=D(h,e);I=""==I?"#000000;":I.replace("strokeColor=","");Eb="shape=triangle;part=1;fillColor="+I;Eb+=c(Eb,h,e,v);L=r/h.numLines;J=[];Mb=[];for(m=0;m<h.numLines;m++)J[m]=
 new mxCell("",new mxGeometry(0,0,0,0),Ua),J[m].geometry.relative=!0,J[m].edge=!0,sa(0,(m+.5)*L,.96*t,(m+.5)*L,J[m],n,f,ca,v,R),Mb[m]=new mxCell("",new mxGeometry(.95*t,(m+.2)*L,.05*t,.6*L),Eb),Mb[m].vertex=!0,v.insert(Mb[m]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);switch(h.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=
 c(v.style,h,e,v,x);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);1==h.peakedRoof&&0==h.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==h.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=c(v.style,h,e,v,x);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style=0==h.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+
@@ -197,8 +197,8 @@ c(v.style,h,e,v,x);break;case "PEClosedTankBlock":v.style+="verticalLabelPositio
 r,J,n,f,ca,v,R));1==h.centerLineType&&(S=new mxCell("",new mxGeometry(0,0,0,0),""),S.geometry.relative=!0,S.edge=!0,S.style+=N,S.style+=c(S.style,h,e,S),sa(.2*t,.5*r,.8*t,.5*r,S,n,f,ca,v,R));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.2*t,.2*r,.6*t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(b.Class){case "PEIndicatorBlock":v.style+=
 "shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=c(v.style,h,e,v);"PEIndicator2Block"==
 b.Class||"PESharedIndicator2Block"==b.Class?(p=new mxCell("",new mxGeometry(0,0,t,.5*t),"part=1;strokeColor=none;fillColor=none;"),p.vertex=!0,v.insert(p),p.value=g(h.TopText),p.style+=l(h.TopText,x),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,.5*t,t,.5*t),"part=1;strokeColor=none;fillColor=none;")):(p=new mxCell("",new mxGeometry(0,0,t,.5*r),"part=1;strokeColor=none;fillColor=none;"),p.vertex=!0,v.insert(p),p.value=g(h.TopText),p.style+=l(h.TopText,x),p.style+=c(p.style,h,e,p,x),
-u=new mxCell("",new mxGeometry(0,.5*r,t,.5*r),"part=1;strokeColor=none;fillColor=none;"));u.vertex=!0;v.insert(u);u.value=g(h.BotText);u.style+=l(h.BotText,x);u.style+=c(u.style,h,e,u,x);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var dd=
-!1;"PEPoweredValveBlock"==b.Class?1!=h.poweredHandOperated&&(dd=!0):1!=h.handOperated&&(dd=!0);if(dd){var h=q(b).Properties,Z=h.BoundingBox,Xd=Z.h;Z.h="PEAngleValveBlock"==b.Class||"PEAngleGlobeValveBlock"==b.Class?.7*Z.h:.6*Z.h;v=new mxCell("",new mxGeometry(Math.round(.6*Z.x+vb),Math.round(.6*(Z.y+Xd-Z.h)+wb),Math.round(.6*Z.w),Math.round(.6*Z.h)),"");v.vertex=!0;Fb(v,b,f)}if("PEPoweredValveBlock"==b.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",
+u=new mxCell("",new mxGeometry(0,.5*r,t,.5*r),"part=1;strokeColor=none;fillColor=none;"));u.vertex=!0;v.insert(u);u.value=g(h.BotText);u.style+=l(h.BotText,x);u.style+=c(u.style,h,e,u,x);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var fd=
+!1;"PEPoweredValveBlock"==b.Class?1!=h.poweredHandOperated&&(fd=!0):1!=h.handOperated&&(fd=!0);if(fd){var h=q(b).Properties,Z=h.BoundingBox,Zd=Z.h;Z.h="PEAngleValveBlock"==b.Class||"PEAngleGlobeValveBlock"==b.Class?.7*Z.h:.6*Z.h;v=new mxCell("",new mxGeometry(Math.round(.6*Z.x+vb),Math.round(.6*(Z.y+Zd-Z.h)+wb),Math.round(.6*Z.w),Math.round(.6*Z.h)),"");v.vertex=!0;Fb(v,b,f)}if("PEPoweredValveBlock"==b.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",
 v.style+=c(v.style,h,e,v),1==h.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",p=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35*r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),p.vertex=!0,v.insert(p),p.value=g(h.PoweredText),p.style+=(x?"":"fontSize=6;"+d(h.PoweredText)+k(h.PoweredText)+w(h.PoweredText)+y(h.PoweredText)+A(h.PoweredText)+B(h.PoweredText)+C(h.PoweredText))+E(h.PoweredText),p.style+=c(p.style,h,e,p,x)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";
 v.value=g(h.Text);switch(b.Class){case "PEGateValveBlock":v.style+="valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==h.handOperated&&(v.style+="actuator=man;")}v.style+=c(v.style,h,e,v,x);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==h.vScroll&&(F=1==h.hScroll?new mxCell("",new mxGeometry(1,
 0,20,r-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(-20,110),F.vertex=!0,v.insert(F),v.style+="spacingRight=20;");1==h.hScroll&&(P=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):
@@ -234,14 +234,14 @@ u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"st
 v.style+=c(v.style,h,e,v);p=[];u=[];W=t/h.Links;for(m=0;m<h.Links;m++)0!=m?(u[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),u[m].style+=c(u[m].style,h,e,u[m])):u[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"fillColor=none;strokeColor=none;"),u[m].vertex=!0,v.insert(u[m]),u[m].value=g(h["Link_"+(m+1)]),u[m].style+=l(h["Link_"+(m+1)],x);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);
 p=[];u=[];W=t/h.Links;for(m=0;m<h.Links;m++)p[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"fillColor=none;strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Link_"+(m+1)]),p[m].style+=l(h["Link_"+(m+1)],x);for(m=1;m<h.Links;m++)u[m]=new mxCell("",new mxGeometry(m/h.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),u[m].geometry.relative=!0,u[m].geometry.offset=new mxPoint(-3,-5),u[m].vertex=!0,v.insert(u[m]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=c(v.style,
 h,e,v);p=[];W=t/(h.Buttons+1);for(m=0;m<=h.Buttons-1;m++)p[m]=m!=h.Selected-1?new mxCell("",new mxGeometry(0,0,W,r),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,W,r),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),p[m].geometry.relative=!0,p[m].geometry.offset=new mxPoint(m*W,0),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["MenuItem_"+(m+1)]),p[m].style+=l(h["MenuItem_"+(m+1)],x);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+
-l(h.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+l(h.Text_prev);v.value=g(h.Text_prev)+" ";for(m=0;m<h.Links;m++)v.value+=g(h["Link_"+(m+1)])+" ";v.value+=g(h.Text_next);break;case "UI2ContextMenuBlock":v.style+=c(v.style,h,e,v);for(var H=[],pb=[],Zb=[],L=r/h.Lines,N=null,m=0;m<h.Lines;m++)null!=h["Item_"+(m+1)]&&(null==N&&(N=""+a(h["Item_"+(m+1)])+d(h["Item_"+(m+1)])+k(h["Item_"+(m+1)])),H[m]=
+l(h.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+l(h.Text_prev);v.value=g(h.Text_prev)+" ";for(m=0;m<h.Links;m++)v.value+=g(h["Link_"+(m+1)])+" ";v.value+=g(h.Text_next);break;case "UI2ContextMenuBlock":v.style+=c(v.style,h,e,v);for(var H=[],pb=[],$b=[],L=r/h.Lines,N=null,m=0;m<h.Lines;m++)null!=h["Item_"+(m+1)]&&(null==N&&(N=""+a(h["Item_"+(m+1)])+d(h["Item_"+(m+1)])+k(h["Item_"+(m+1)])),H[m]=
 new mxCell("",new mxGeometry(0,m*r/h.Lines,t,L),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N,H[m].value=g(h["Item_"+(m+1)])),null!=h.Icons[m+1]&&null!=H[m]&&("dot"==h.Icons[m+1]?(pb[m]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),pb[m].geometry.offset=new mxPoint(6,-4)):"check"==h.Icons[m+1]&&(pb[m]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),pb[m].geometry.offset=
-new mxPoint(6.5,-4)),null!=pb[m]&&(pb[m].geometry.relative=!0,pb[m].vertex=!0,H[m].insert(pb[m]),I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),pb[m].style+=I)),null!=h["Shortcut_"+(m+1)]&&(null==N&&(N=""+a(h["Shortcut_"+(m+1)])+d(h["Shortcut_"+(m+1)])+k(h["Shortcut_"+(m+1)])),Zb[m]=new mxCell("",new mxGeometry(.6*t,m*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),Zb[m].vertex=!0,v.insert(Zb[m]),Zb[m].style+=N,Zb[m].value=g(h["Shortcut_"+
+new mxPoint(6.5,-4)),null!=pb[m]&&(pb[m].geometry.relative=!0,pb[m].vertex=!0,H[m].insert(pb[m]),I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),pb[m].style+=I)),null!=h["Shortcut_"+(m+1)]&&(null==N&&(N=""+a(h["Shortcut_"+(m+1)])+d(h["Shortcut_"+(m+1)])+k(h["Shortcut_"+(m+1)])),$b[m]=new mxCell("",new mxGeometry(.6*t,m*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),$b[m].vertex=!0,v.insert($b[m]),$b[m].style+=N,$b[m].value=g(h["Shortcut_"+
 (m+1)])),null!=h.Dividers[m+1]&&(H[m]=new mxCell("",new mxGeometry(.05*t,m*r/h.Lines,.9*t,L),"shape=line;strokeWidth=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=D(h,e));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*h.ScrollVal+";";break;case "UI2TooltipSquareBlock":v.value=g(h.Tip);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+h.RoundCorners+";"+l(h.Tip,x);v.style+=c(v.style,
 h,e,v,x);break;case "UI2CalloutBlock":v.value=g(h.Txt);v.style+="shape=ellipse;"+l(h.Txt,x);v.style+=c(v.style,h,e,v,x);break;case "UI2AlertBlock":v.value=g(h.Txt);v.style+=l(h.Txt,x);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");p.vertex=!0;v.insert(p);p.value=g(h.Title);p.style+=l(h.Title,x);p.style+=c(p.style,h,e,p,x);u=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");u.geometry.relative=
-!0;u.geometry.offset=new mxPoint(-25,-10);u.vertex=!0;p.insert(u);for(var Yd=45*h.Buttons+(10*h.Buttons-1),F=[],m=0;m<h.Buttons;m++)F[m]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),F[m].geometry.relative=!0,F[m].geometry.offset=new mxPoint(.5*-Yd+55*m,-40),F[m].vertex=!0,v.insert(F[m]),F[m].value=g(h["Button_"+(m+1)]),F[m].style+=l(h["Button_"+(m+1)],x),F[m].style+=c(F[m].style,h,e,F[m],x);break;case "UMLClassBlock":if(0==h.Simple){var N=O(h,e),Ha=Math.round(.6*h.TitleHeight)||25,N=
-N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Title,x);v.style+=c(v.style,h,e,v,x);for(var H=[],ed=[],Da=Ha/r,m=0;m<=h.Attributes;m++)0<m&&(ed[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;"),
-ed[m].vertex=!0,v.insert(ed[m])),L=0,0==h.Attributes?L=m=1:m<h.Attributes?(L=h["Text"+(m+1)+"Percent"],Da+=L):L=1-Da,H[m]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Ha)*L)+(h.ExtraHeightSet&&1==m?.6*h.ExtraHeight:0)),"part=1;html=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+M(h,e,H[m])+a(h["Text"+(m+1)])+
+!0;u.geometry.offset=new mxPoint(-25,-10);u.vertex=!0;p.insert(u);for(var $d=45*h.Buttons+(10*h.Buttons-1),F=[],m=0;m<h.Buttons;m++)F[m]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),F[m].geometry.relative=!0,F[m].geometry.offset=new mxPoint(.5*-$d+55*m,-40),F[m].vertex=!0,v.insert(F[m]),F[m].value=g(h["Button_"+(m+1)]),F[m].style+=l(h["Button_"+(m+1)],x),F[m].style+=c(F[m].style,h,e,F[m],x);break;case "UMLClassBlock":if(0==h.Simple){var N=O(h,e),Ha=Math.round(.6*h.TitleHeight)||25,N=
+N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Title,x);v.style+=c(v.style,h,e,v,x);for(var H=[],gd=[],Da=Ha/r,m=0;m<=h.Attributes;m++)0<m&&(gd[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;"),
+gd[m].vertex=!0,v.insert(gd[m])),L=0,0==h.Attributes?L=m=1:m<h.Attributes?(L=h["Text"+(m+1)+"Percent"],Da+=L):L=1-Da,H[m]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Ha)*L)+(h.ExtraHeightSet&&1==m?.6*h.ExtraHeight:0)),"part=1;html=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+M(h,e,H[m])+a(h["Text"+(m+1)])+
 d(h["Text"+(m+1)])+k(h["Text"+(m+1)]),H[m].value=g(h["Text"+(m+1)])}else v.value=g(h.Title),v.style+=l(h.Title,x),v.style+=c(v.style,h,e,v,x);break;case "ERDEntityBlock":N=O(h,e);Ha=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Name,x);v.style+=c(v.style,
 h,e,v,x);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+O(h,e);H=[];Da=Ha/r;for(m=0;m<h.Fields;m++)L=0,H[m]=new mxCell("",new mxGeometry(0,0,t,.6*h["Field"+(m+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%
 2?H[m].style+"fillColor=#000000;opacity=5;":H[m].style+("fillColor=none;"+M(h,e,H[m])),H[m].value=g(h["Field"+(m+1)]);break;case "ERDEntityBlock2":N=O(h,e);Ha=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Name,x);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+O(h,e);v.style+=c(v.style,h,e,v,x);var H=
@@ -251,9 +251,9 @@ aa[m].style+("fillColor=none;"+M(h,e,aa[m])),aa[m].value=g(h["Key"+(m+1)]),H[m]=
 v.value=g(h.Name);v.style+=c(v.style,h,e,v,x);H=[];aa=[];Da=Ha;Ka=30;null!=h.Column1&&(Ka=.6*h.Column1);for(m=0;m<h.Fields;m++)L=0,aa[m]=new mxCell("",new mxGeometry(0,Da,Ka,.6*h["Field"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),aa[m].vertex=!0,v.insert(aa[m]),aa[m].style+=N+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),aa[m].style=1==h.AltRows&&
 0!=m%2?aa[m].style+"fillColor=#000000;fillOpacity=5;":aa[m].style+("fillColor=none;"+M(h,e,aa[m])),aa[m].value=g(h["Field"+(m+1)]),aa[m].style+=c(aa[m].style,h,e,aa[m],x),H[m]=new mxCell("",new mxGeometry(Ka,Da,t-Ka,.6*h["Type"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+a(h["Type"+
 (m+1)])+d(h["Type"+(m+1)])+k(h["Type"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+("fillColor=none;"+M(h,e,H[m])),H[m].value=g(h["Type"+(m+1)]),H[m].style+=c(H[m].style,h,e,H[m],x),Da+=.6*h["Field"+(m+1)+"_h"];break;case "ERDEntityBlock4":N=O(h,e);Ha=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+
-Ha+";"+l(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+O(h,e);v.value=g(h.Name);v.style+=c(v.style,h,e,v,x);var H=[],aa=[],La=[],Da=Ha,Ka=30,Mc=40;null!=h.Column1&&(Ka=.6*h.Column1);null!=h.Column2&&(Mc=.6*h.Column2);for(m=0;m<h.Fields;m++)L=0,aa[m]=new mxCell("",new mxGeometry(0,Da,Ka,.6*h["Key"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-aa[m].vertex=!0,v.insert(aa[m]),aa[m].style+=N+a(h["Key"+(m+1)])+d(h["Key"+(m+1)])+k(h["Key"+(m+1)]),aa[m].style=1==h.AltRows&&0!=m%2?aa[m].style+"fillColor=#000000;fillOpacity=5;":aa[m].style+("fillColor=none;"+M(h,e,aa[m])),aa[m].value=g(h["Key"+(m+1)]),aa[m].style+=c(aa[m].style,h,e,aa[m],x),H[m]=new mxCell("",new mxGeometry(Ka,Da,t-Ka-Mc,.6*h["Field"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+("fillColor=none;"+M(h,e,H[m])),H[m].value=g(h["Field"+(m+1)]),H[m].style+=c(H[m].style,h,e,H[m],x),La[m]=new mxCell("",new mxGeometry(t-Mc,Da,Mc,.6*h["Type"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+Ha+";"+l(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+O(h,e);v.value=g(h.Name);v.style+=c(v.style,h,e,v,x);var H=[],aa=[],La=[],Da=Ha,Ka=30,Oc=40;null!=h.Column1&&(Ka=.6*h.Column1);null!=h.Column2&&(Oc=.6*h.Column2);for(m=0;m<h.Fields;m++)L=0,aa[m]=new mxCell("",new mxGeometry(0,Da,Ka,.6*h["Key"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+aa[m].vertex=!0,v.insert(aa[m]),aa[m].style+=N+a(h["Key"+(m+1)])+d(h["Key"+(m+1)])+k(h["Key"+(m+1)]),aa[m].style=1==h.AltRows&&0!=m%2?aa[m].style+"fillColor=#000000;fillOpacity=5;":aa[m].style+("fillColor=none;"+M(h,e,aa[m])),aa[m].value=g(h["Key"+(m+1)]),aa[m].style+=c(aa[m].style,h,e,aa[m],x),H[m]=new mxCell("",new mxGeometry(Ka,Da,t-Ka-Oc,.6*h["Field"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+("fillColor=none;"+M(h,e,H[m])),H[m].value=g(h["Field"+(m+1)]),H[m].style+=c(H[m].style,h,e,H[m],x),La[m]=new mxCell("",new mxGeometry(t-Oc,Da,Oc,.6*h["Type"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
 La[m].vertex=!0,v.insert(La[m]),La[m].style+=N+a(h["Type"+(m+1)])+d(h["Type"+(m+1)])+k(h["Type"+(m+1)]),La[m].style=1==h.AltRows&&0!=m%2?La[m].style+"fillColor=#000000;fillOpacity=5;":La[m].style+("fillColor=none;"+M(h,e,La[m])),La[m].value=g(h["Type"+(m+1)]),La[m].style+=c(La[m].style,h,e,La[m],x),Da+=.6*h["Key"+(m+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":ga("application_system",t,r,v,h,e);break;case "GCPServiceCardAuthorizationBlock":ga("internal_payment_authorization",t,r,v,h,
 e);break;case "GCPServiceCardBlankBlock":ga("blank",t,r,v,h,e);break;case "GCPServiceCardReallyBlankBlock":ga("blank",t,r,v,h,e);break;case "GCPServiceCardBucketBlock":ga("bucket",t,r,v,h,e);break;case "GCPServiceCardCDNInterconnectBlock":ga("google_network_edge_cache",t,r,v,h,e);break;case "GCPServiceCardCloudDNSBlock":ga("blank",t,r,v,h,e);break;case "GCPServiceCardClusterBlock":ga("cluster",t,r,v,h,e);break;case "GCPServiceCardDiskSnapshotBlock":ga("persistent_disk_snapshot",t,r,v,h,e);break;case "GCPServiceCardEdgePopBlock":ga("google_network_edge_cache",
 t,r,v,h,e);break;case "GCPServiceCardFrontEndPlatformServicesBlock":ga("frontend_platform_services",t,r,v,h,e);break;case "GCPServiceCardGatewayBlock":ga("gateway",t,r,v,h,e);break;case "GCPServiceCardGoogleNetworkBlock":ga("google_network_edge_cache",t,r,v,h,e);break;case "GCPServiceCardImageServicesBlock":ga("image_services",t,r,v,h,e);break;case "GCPServiceCardLoadBalancerBlock":ga("network_load_balancer",t,r,v,h,e);break;case "GCPServiceCardLocalComputeBlock":ga("dedicated_game_server",t,r,v,
@@ -262,8 +262,8 @@ t,r,v,h,e);break;case "GCPServiceCardServiceDiscoveryBlock":ga("service_discover
 h,e);break;case "GCPInputPayment":ka("payment",1,.8,t,r,v,h,e);break;case "GCPInputGateway":ka("gateway_icon",1,.44,t,r,v,h,e);break;case "GCPInputLocalCompute":ka("compute_engine_icon",1,.89,t,r,v,h,e);break;case "GCPInputBeacon":ka("beacon",.73,1,t,r,v,h,e);break;case "GCPInputStorage":ka("storage",1,.8,t,r,v,h,e);break;case "GCPInputList":ka("list",.89,1,t,r,v,h,e);break;case "GCPInputStream":ka("stream",1,.82,t,r,v,h,e);break;case "GCPInputMobileDevices":ka("mobile_devices",1,.73,t,r,v,h,e);break;
 case "GCPInputCircuitBoard":ka("circuit_board",1,.9,t,r,v,h,e);break;case "GCPInputLive":ka("live",.74,1,t,r,v,h,e);break;case "GCPInputUsers":ka("users",1,.63,t,r,v,h,e);break;case "GCPInputLaptop":ka("laptop",1,.66,t,r,v,h,e);break;case "GCPInputApplication":ka("application",1,.8,t,r,v,h,e);break;case "GCPInputLightbulb":ka("lightbulb",.7,1,t,r,v,h,e);break;case "GCPInputGame":ka("game",1,.54,t,r,v,h,e);break;case "GCPInputDesktop":ka("desktop",1,.9,t,r,v,h,e);break;case "GCPInputDesktopAndMobile":ka("desktop_and_mobile",
 1,.66,t,r,v,h,e);break;case "GCPInputWebcam":ka("webcam",.5,1,t,r,v,h,e);break;case "GCPInputSpeaker":ka("speaker",.7,1,t,r,v,h,e);break;case "GCPInputRetail":ka("retail",1,.89,t,r,v,h,e);break;case "GCPInputReport":ka("report",1,1,t,r,v,h,e);break;case "GCPInputPhone":ka("phone",.64,1,t,r,v,h,e);break;case "GCPInputBlank":ka("transparent",1,1,t,r,v,h,e);break;case "PresentationFrameBlock":0==h.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=l(h.Text),v.value=g(h.Text),v.style+=c(v.style,
-h,e,v,x));break;case "SVGPathBlock2":try{for(var Zd=h.LineWidth,$d=h.LineColor,ae=h.FillColor,Dd=h.DrawData.Data,Dc='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',m=0;m<Dd.length;m++)var Nb=Dd[m],be=Nb.a,ce="prop"==Nb.w?Zd:Nb.w,Kb="prop"==Nb.s?$d:Nb.s,I="prop"==Nb.f?ae:Nb.f,Dc=Dc+('<path d="'+be+'" fill="'+I+'" stroke="'+Kb+'" stroke-width="'+ce+'"/>');Dc+="</svg>";v.style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+
-(window.btoa?btoa(Dc):Base64.encode(Dc,!0))}catch(Gd){}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");return v}var vb=0,wb=0,x=!1,Nc=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],Oc=["fpDoor"],xb={None:"none;",Arrow:"block;endFill=1;","Hollow Arrow":"block;endFill=0;","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10;","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10;","CFN ERD Many Arrow":"ERmany;startSize=10;",
+h,e,v,x));break;case "SVGPathBlock2":try{for(var ae=h.LineWidth,be=h.LineColor,ce=h.FillColor,Gd=h.DrawData.Data,Dc='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',m=0;m<Gd.length;m++)var Nb=Gd[m],de=Nb.a,ee="prop"==Nb.w?ae:Nb.w,Kb="prop"==Nb.s?be:Nb.s,I="prop"==Nb.f?ce:Nb.f,Dc=Dc+('<path d="'+de+'" fill="'+I+'" stroke="'+Kb+'" stroke-width="'+ee+'"/>');Dc+="</svg>";v.style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+
+(window.btoa?btoa(Dc):Base64.encode(Dc,!0))}catch(Jd){}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");return v}var vb=0,wb=0,x=!1,Pc=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],Qc=["fpDoor"],xb={None:"none;",Arrow:"block;endFill=1;","Hollow Arrow":"block;endFill=0;","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10;","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10;","CFN ERD Many Arrow":"ERmany;startSize=10;",
 "CFN ERD Exactly One Arrow":"ERmandOne;startSize=10;","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10;","CFN ERD One Arrow":"ERone;startSize=16;",Generalization:"block;endFill=0;startSize=12;","Big Open Arrow":"open;startSize=10;",Asynch1:"openAsync;flipH=1;startSize=10;",Asynch2:"openAsync;startSize=10;",Aggregation:"diamond;endFill=0;startSize=16;",Composition:"diamond;endFill=1;startSize=16;",BlockEnd:"none;endFill=1;startSize=16;",Measure:"ERone;startSize=10;"},Gb={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",
 DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ProcessBlock:"",DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",DocumentBlock:"shape=document",MultiDocumentBlock:"shape=mxgraph.flowchart.multi-document",ManualInputBlock:"shape=manualInput;size=15",
 PreparationBlock:"shape=hexagon;perimeter=hexagonPerimeter2",DataBlock:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DataBlockNew:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DatabaseBlock:"shape=cylinder;size=0.1;anchorPointDirection=0;boundedLbl=1;",DirectAccessStorageBlock:"shape=cylinder;direction=south;size=0.1;anchorPointDirection=0;boundedLbl=1;",InternalStorageBlock:"shape=internalStorage;dx=10;dy=10",PaperTapeBlock:"shape=tape;size=0.2",
@@ -894,7 +894,7 @@ SMShopping:"shape=mxgraph.sitemap.shopping;strokeColor=#000000;fillColor=#E6E6E6
 SMSettings:"shape=mxgraph.sitemap.settings;strokeColor=#000000;fillColor=#E6E6E6",SMSitemap:"shape=mxgraph.sitemap.sitemap;strokeColor=#000000;fillColor=#E6E6E6",SMSuccess:"shape=mxgraph.sitemap.success;strokeColor=#000000;fillColor=#E6E6E6",SMVideo:"shape=mxgraph.sitemap.video;strokeColor=#000000;fillColor=#E6E6E6",SMAudio:"shape=mxgraph.sitemap.audio;strokeColor=#000000;fillColor=#E6E6E6",SMBlog:"shape=mxgraph.sitemap.blog;strokeColor=#000000;fillColor=#E6E6E6",SMCalendar:"shape=mxgraph.sitemap.calendar;strokeColor=#000000;fillColor=#E6E6E6",
 SMChart:"shape=mxgraph.sitemap.chart;strokeColor=#000000;fillColor=#E6E6E6",SMCloud:"shape=mxgraph.sitemap.cloud;strokeColor=#000000;fillColor=#E6E6E6",SMDocument:"shape=mxgraph.sitemap.document;strokeColor=#000000;fillColor=#E6E6E6",SMDownload:"shape=mxgraph.sitemap.download;strokeColor=#000000;fillColor=#E6E6E6",SMError:"shape=mxgraph.sitemap.error;strokeColor=#000000;fillColor=#E6E6E6",SMForm:"shape=mxgraph.sitemap.form;strokeColor=#000000;fillColor=#E6E6E6",SMGame:"shape=mxgraph.sitemap.game;strokeColor=#000000;fillColor=#E6E6E6",
 SMJobs:"shape=mxgraph.sitemap.jobs;strokeColor=#000000;fillColor=#E6E6E6",SMLucid:"shape=mxgraph.sitemap.home;strokeColor=#000000;fillColor=#E6E6E6",SMNewspress:"shape=mxgraph.sitemap.news;strokeColor=#000000;fillColor=#E6E6E6",SMPhoto:"shape=mxgraph.sitemap.photo;strokeColor=#000000;fillColor=#E6E6E6",SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",
-SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6",SVGPathBlock2:"mxCompositeShape",PresentationFrameBlock:"mxCompositeShape"},Pc=RegExp("{{(date{.*}|[^%^{^}]+)}}","g"),cc=function(a,b,d){0>mxUtils.indexOf(d,a)&&d.push(a);if(a in b){var k=b[a];k.id=a;if(null!=k.Members)for(var n in k.Members)d=cc(n,b,d)}return d};LucidImporter.importState=function(a){function b(a){for(var b in a.Pages)k.push(a.Pages[b]);
+SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6",SVGPathBlock2:"mxCompositeShape",PresentationFrameBlock:"mxCompositeShape"},Rc=RegExp("{{(date{.*}|[^%^{^}]+)}}","g"),cc=function(a,b,d){0>mxUtils.indexOf(d,a)&&d.push(a);if(a in b){var k=b[a];k.id=a;if(null!=k.Members)for(var n in k.Members)d=cc(n,b,d)}return d};LucidImporter.importState=function(a){function b(a){for(var b in a.Pages)k.push(a.Pages[b]);
 k.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}var d=['<?xml version="1.0" encoding="UTF-8"?>',"<mxfile>"],k=[];null!=a.state&&"1"==urlParams.dev&&null!=window.console&&console.log(JSON.stringify(JSON.parse(a.state),null,2));null!=a.state?b(JSON.parse(a.state)):null==a.Page&&null!=a.Pages?b(a):k.push(a);a=Oa();for(var n=new mxCodec,c=0;c<k.length;c++){d.push("<diagram");null!=k[c].Properties&&null!=k[c].Properties.Title&&d.push(' name="'+
 mxUtils.htmlEntities(k[c].Properties.Title)+'"');d.push(' id="'+c+'"');fa(a,k[c],null,null,null,!0);var f=n.encode(a.getModel());a.getModel().clear();d.push(">"+Graph.compress(mxUtils.getXml(f))+"</diagram>")}d.push("</mxfile>");return d.join("")}})();function VsdxExport(f){function g(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
 "_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>",
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index fc66de4ab..8297603f4 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -1162,7 +1162,7 @@ Graph.removePasteFormatting = function(elt)
 		{
 			elt.style.whiteSpace = '';
 			
-			if (elt.style.color = '#000000')
+			if (elt.style.color == '#000000')
 			{
 				elt.style.color = '';
 			}
diff --git a/src/main/webapp/js/mxgraph/Init.js b/src/main/webapp/js/mxgraph/Init.js
index 32ab10b9a..d4467ea1e 100644
--- a/src/main/webapp/js/mxgraph/Init.js
+++ b/src/main/webapp/js/mxgraph/Init.js
@@ -26,4 +26,4 @@ window.OPEN_FORM = window.OPEN_FORM || 'open.html';
 // each properties file since only one file is loaded.
 window.mxBasePath = window.mxBasePath || '../../../src';
 window.mxLanguage = window.mxLanguage || urlParams['lang'];
-window.mxLanguages = window.mxLanguages || ['de'];
+window.mxLanguages = window.mxLanguages || ['de', 'se'];
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index e3fd8e054..957628692 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -107,14 +107,13 @@ window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefi
 (function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
 null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
 if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"1"==urlParams.lightbox&&(urlParams.chrome="0");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);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:"4.1.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&
+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","se"];var mxClient={VERSION:"4.1.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&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:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&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:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IOS_VERSION:function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);if(null!=a&&0<a.length)return parseInt(a[1])}return 0}(),IS_GC:/Google Inc/.test(navigator.vendor),
-IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_CHROMEOS:/\bCrOS\b/.test(navigator.appVersion),
-IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf("Mac")),IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c,d){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="UTF-8" type="text/css"/>');else{var e=c.createElement("link");e.setAttribute("rel",
-a);e.setAttribute("href",b);e.setAttribute("charset","UTF-8");e.setAttribute("type","text/css");d&&e.setAttribute("id",d);c.getElementsByTagName("head")[0].appendChild(e)}},loadResources:function(a,b){function c(){0==--d&&a()}for(var d=mxClient.defaultBundles.length,e=0;e<mxClient.defaultBundles.length;e++)mxResources.add(mxClient.defaultBundles[e],b,c)},include:function(a){document.write('<script src="'+a+'">\x3c/script>')}};
-mxClient.IS_SF&&mxClient.IS_TOUCH&&!mxClient.IS_IOS&&(mxClient.IOS_VERSION=13,mxClient.IOS=!0);"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1);"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);
+0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,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_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=
+navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_CHROMEOS:/\bCrOS\b/.test(navigator.appVersion),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf("Mac")),IS_LOCAL:0>document.location.href.indexOf("http://")&&
+0>document.location.href.indexOf("https://"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c,d){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="UTF-8" type="text/css"/>');else{var e=c.createElement("link");e.setAttribute("rel",a);e.setAttribute("href",b);e.setAttribute("charset","UTF-8");e.setAttribute("type","text/css");d&&e.setAttribute("id",d);c.getElementsByTagName("head")[0].appendChild(e)}},loadResources:function(a,
+b){function c(){0==--d&&a()}for(var d=mxClient.defaultBundles.length,e=0;e<mxClient.defaultBundles.length;e++)mxResources.add(mxClient.defaultBundles[e],b,c)},include:function(a){document.write('<script src="'+a+'">\x3c/script>')}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1);"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);
 "undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";
 mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
 mxClient.IS_VML&&(mxClient.IS_SVG?mxClient.IS_VML=!1:(null!=document.namespaces&&(8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"))),mxClient.IS_QUIRKS&&30<=document.styleSheets.length?
@@ -354,7 +353,7 @@ mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){
 mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e))for(d=this.graph.getModel().getChildCount(a),e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)};
 mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
 mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
-mxImageBundle.prototype.images=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;
+mxImageBundle.prototype.alt=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;
 mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawCellState.apply(this,arguments)})),this.includeOverlays&&this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawOverlays.apply(this,arguments)})))};
 mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.getLinkForCellState=function(a,b){return null};mxImageExport.prototype.drawCellState=function(a,b){var c=this.getLinkForCellState(a,b);null!=c&&b.setLink(c);this.drawShape(a,b);this.drawText(a,b);null!=c&&b.setLink(null)};
 mxImageExport.prototype.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),a.shape.paint(b),b.restore())};mxImageExport.prototype.drawText=function(a,b){null!=a.text&&a.text.checkBounds()&&(b.save(),a.text.paint(b),b.restore())};mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(a,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}
@@ -493,10 +492,10 @@ function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=nul
 mxGuide.prototype.getGuideTolerance=function(a){return a&&this.graph.gridEnabled?this.graph.gridSize/2:this.tolerance};mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};mxGuide.prototype.isStateIgnored=function(a){return!1};
 mxGuide.prototype.move=function(a,b,c,d){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){d=function(c,d,e){var f=!1;e&&Math.abs(c-z)<t?(b.y=c-a.getCenterY(),t=Math.abs(c-z),f=!0):e||(Math.abs(c-B)<t?(b.y=c-a.y,t=Math.abs(c-B),f=!0):Math.abs(c-A)<t&&(b.y=c-a.y-a.height,t=Math.abs(c-A),f=!0));f&&(p=d,q=c,null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=
 !1,this.guideY.init(this.graph.getView().getOverlayPane())));n=n||f};var e=function(c,d,e){var f=!1;e&&Math.abs(c-y)<r?(b.x=c-a.getCenterX(),r=Math.abs(c-y),f=!0):e||(Math.abs(c-u)<r?(b.x=c-a.x,r=Math.abs(c-u),f=!0):Math.abs(c-x)<r&&(b.x=c-a.x-a.width,r=Math.abs(c-x),f=!0));f&&(l=d,m=c,null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));
-k=k||f};this.graph.getView();var f=this.graph.getView().scale,f=this.getGuideTolerance(c)*f,g=a.clone();g.x+=b.x;g.y+=b.y;for(var k=!1,l=null,m=null,n=!1,p=null,q=null,r=f,t=f,u=g.x,x=g.x+g.width,y=g.getCenterX(),B=g.y,A=g.y+g.height,z=g.getCenterY(),f=0;f<this.states.length;f++)g=this.states[f],null==g||this.isStateIgnored(g)||(this.horizontal&&(e.call(this,g.getCenterX(),g,!0),e.call(this,g.x,g,!1),e.call(this,g.x+g.width,g,!1),null==g.cell&&e.call(this,g.getCenterX(),g,!1)),this.vertical&&(d.call(this,
-g.getCenterY(),g,!0),d.call(this,g.y,g,!1),d.call(this,g.y+g.height,g,!1),null==g.cell&&d.call(this,g.getCenterY(),g,!1)));this.graph.snapDelta(b,a,!c,k,n);b=this.getDelta(a,l,b.x,p,b.y);c=this.graph.container;k||null==this.guideX?null!=this.guideX&&(e=d=null,null!=l&&null!=a&&(d=Math.min(a.y+b.y-this.graph.panDy,l.y),e=Math.max(a.y+a.height+b.y-this.graph.panDy,l.y+l.height)),this.guideX.points=null!=d&&null!=e?[new mxPoint(m,d),new mxPoint(m,e)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,c.scrollHeight-
-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";n||null==this.guideY?null!=this.guideY&&(e=d=null,null!=p&&null!=a&&(d=Math.min(a.x+b.x-this.graph.panDx,p.x),e=Math.max(a.x+a.width+b.x-this.graph.panDx,p.x+p.width)),this.guideY.points=null!=d&&null!=e?[new mxPoint(d,q),new mxPoint(e,q)]:[new mxPoint(-this.graph.panDx,q),new mxPoint(c.scrollWidth-3-this.graph.panDx,q)],this.guideY.stroke=
-this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden"}return b};mxGuide.prototype.getDelta=function(a,b,c,d,e){var f=this.graph.view.scale;if(this.rounded||null!=b&&null==b.cell)c=Math.round((a.x+c)/f)*f-a.x;if(this.rounded||null!=d&&null==d.cell)e=Math.round((a.y+e)/f)*f-a.y;return new mxPoint(c,e)};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
+k=k||f},f=this.graph.getView().scale,f=this.getGuideTolerance(c)*f,g=a.clone();g.x+=b.x;g.y+=b.y;for(var k=!1,l=null,m=null,n=!1,p=null,q=null,r=f,t=f,u=g.x,x=g.x+g.width,y=g.getCenterX(),B=g.y,A=g.y+g.height,z=g.getCenterY(),f=0;f<this.states.length;f++)g=this.states[f],null==g||this.isStateIgnored(g)||(this.horizontal&&(e.call(this,g.getCenterX(),g,!0),e.call(this,g.x,g,!1),e.call(this,g.x+g.width,g,!1),null==g.cell&&e.call(this,g.getCenterX(),g,!1)),this.vertical&&(d.call(this,g.getCenterY(),g,
+!0),d.call(this,g.y,g,!1),d.call(this,g.y+g.height,g,!1),null==g.cell&&d.call(this,g.getCenterY(),g,!1)));this.graph.snapDelta(b,a,!c,k,n);b=this.getDelta(a,l,b.x,p,b.y);c=this.graph.container;k||null==this.guideX?null!=this.guideX&&(e=d=null,null!=l&&null!=a&&(d=Math.min(a.y+b.y-this.graph.panDy,l.y),e=Math.max(a.y+a.height+b.y-this.graph.panDy,l.y+l.height)),this.guideX.points=null!=d&&null!=e?[new mxPoint(m,d),new mxPoint(m,e)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,c.scrollHeight-3-this.graph.panDy)],
+this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";n||null==this.guideY?null!=this.guideY&&(e=d=null,null!=p&&null!=a&&(d=Math.min(a.x+b.x-this.graph.panDx,p.x),e=Math.max(a.x+a.width+b.x-this.graph.panDx,p.x+p.width)),this.guideY.points=null!=d&&null!=e?[new mxPoint(d,q),new mxPoint(e,q)]:[new mxPoint(-this.graph.panDx,q),new mxPoint(c.scrollWidth-3-this.graph.panDx,q)],this.guideY.stroke=this.getGuideColor(p,
+!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden"}return b};mxGuide.prototype.getDelta=function(a,b,c,d,e){var f=this.graph.view.scale;if(this.rounded||null!=b&&null==b.cell)c=Math.round((a.x+c)/f)*f-a.x;if(this.rounded||null!=d&&null==d.cell)e=Math.round((a.y+e)/f)*f-a.y;return new mxPoint(c,e)};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
 mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxShape(a){this.stencil=a;this.initStyles()}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.antiAlias=!0;
 mxShape.prototype.minSvgStrokeWidth=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=8;mxShape.prototype.pointerEvents=!0;mxShape.prototype.svgPointerEvents="all";mxShape.prototype.shapePointerEvents=!1;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.vmlScale=1;
 mxShape.prototype.outline=!1;mxShape.prototype.visible=!0;mxShape.prototype.useSvgBoundingBox=!1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.initStyles=function(a){this.strokewidth=1;this.rotation=0;this.strokeOpacity=this.fillOpacity=this.opacity=100;this.flipV=this.flipH=!1};mxShape.prototype.isParseVml=function(){return!0};mxShape.prototype.isHtmlAllowed=function(){return!1};
@@ -659,7 +658,7 @@ mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBo
 1);a.grow(b*this.scale)};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;mxSwimlane.prototype.isRoundable=function(a,b,c,d,e){return!0};mxSwimlane.prototype.getTitleSize=function(){return Math.max(0,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE))};
 mxSwimlane.prototype.getLabelBounds=function(a){var b=this.getTitleSize();a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH||
 this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=this.getTitleSize();if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)};
-mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
+mxSwimlane.prototype.getArcSize=function(a,b,c){if("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))return Math.min(a/2,Math.min(b/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
 mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=this.getTitleSize(),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),k=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),l=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(l=this.getArcSize(d,e,f),l=Math.min((this.isHorizontal()?e:d)-f,Math.min(f,l)),this.paintRoundedSwimlane(a,b,c,d,e,f,l,g,k)):this.paintSwimlane(a,b,c,d,e,f,g,k);g=mxUtils.getValue(this.style,
 mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,l))};
 mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,k){a.begin();this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.fillAndStroke(),f<e&&(g==mxConstants.NONE?a.pointerEvents=!1:a.setFillColor(g),a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),g==mxConstants.NONE?a.stroke():a.fillAndStroke())):(a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),a.fillAndStroke(),f<d&&(g==mxConstants.NONE?a.pointerEvents=!1:a.setFillColor(g),a.begin(),a.moveTo(f,
@@ -1412,9 +1411,9 @@ mxGraph.prototype.createEdgeHandler=function(a,b){return b==mxEdgeStyle.Loop||b=
 mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};
 mxGraph.prototype.updateMouseEvent=function(a,b){if(null==a.graphX||null==a.graphY){var c=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=c.x-this.panDx;a.graphY=c.y-this.panDy;null==a.getCell()&&this.isMouseDown&&b==mxEvent.MOUSE_MOVE&&(a.state=this.view.getState(this.getCellAt(c.x,c.y,null,null,null,function(a){return null==a.shape||a.shape.paintBackground!=mxRectangleShape.prototype.paintBackground||"1"==mxUtils.getValue(a.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=a.shape.fill&&
 a.shape.fill!=mxConstants.NONE})))}return a};mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
-mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=!1;b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):mxClient.IS_GC||null==this.eventSource||b.getSource()==this.eventSource?mxClient.IS_TOUCH&&12>=mxClient.IOS_VERSION&&a==mxEvent.MOUSE_DOWN&&
-!d&&!mxEvent.isPenEvent(b.getEvent())&&(this.eventSource=b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect)):e=!0;this.isSyntheticEventIgnored(a,b,c)&&(e=!0);
-if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail)return!0;a==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:a!=mxEvent.MOUSE_DOWN||this.isMouseDown?!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(e=!0):(this.isMouseDown=!0,this.isMouseTrigger=d);e||a!=mxEvent.MOUSE_DOWN||(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
+mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=!1;b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):mxClient.IS_GC||null==this.eventSource||b.getSource()==this.eventSource?!mxClient.IS_TOUCH||a!=mxEvent.MOUSE_DOWN||d||mxEvent.isPenEvent(b.getEvent())||
+(this.eventSource=b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect)):e=!0;this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&
+a!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail)return!0;a==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:a!=mxEvent.MOUSE_DOWN||this.isMouseDown?!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(e=!0):(this.isMouseDown=!0,this.isMouseTrigger=d);e||a!=mxEvent.MOUSE_DOWN||(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
 mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&!b&&a==mxEvent.MOUSE_UP&&(this.ignoreMouseEvents=!0);return c};
 mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource(),d=null!=c.nodeName?c.nodeName.toLowerCase():"",e=!mxEvent.isMouseEvent(b.getEvent())||mxEvent.isLeftMouseButton(b.getEvent());return a==mxEvent.MOUSE_DOWN&&e&&("select"==d||"option"==d||"input"==d&&"checkbox"!=c.type&&"radio"!=c.type&&"button"!=c.type&&"submit"!=c.type&&"file"!=c.type)};mxGraph.prototype.getEventState=function(a){return a};
 mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{null==c&&(c=this);b=this.updateMouseEvent(b,a);if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))){var d=(new Date).getTime();if(!mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_UP&&!this.fireDoubleClick)if(null!=
@@ -1502,9 +1501,9 @@ mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.l
 mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1,mxClient.IS_IOS&&(a.getSvgScreenOffset=function(){return 0}));return a};
 mxGraphHandler.prototype.start=function(a,b,c,d){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=null!=d?d:this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.allCells=new mxDictionary;this.cloning=!1;for(b=this.cellCount=0;b<this.cells.length;b++)this.cellCount+=this.addStates(this.cells[b],this.allCells);if(this.guidesEnabled){this.guide=new mxGuide(this.graph,this.getGuideStates());
 var e=this.graph.model.getParent(a),f=2>this.graph.model.getChildCount(e),g=new mxDictionary;a=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell);for(b=0;b<a.length;b++)c=this.graph.view.getState(a[b]),null==c||g.get(c)||g.put(c,!0);this.guide.isStateIgnored=mxUtils.bind(this,function(a){var b=this.graph.model.getParent(a.cell);return null!=a.cell&&(!this.cloning&&this.isCellMoving(a.cell)||a.cell!=(this.target||e)&&!f&&!g.get(a)&&(null==this.target||2<=this.graph.model.getChildCount(this.target))&&
-b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent()):!0};
-mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a};mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};
-mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a};
+b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)};
+mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent())&&!this.graph.isConstrainedEvent(a.getEvent()):!0};mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a};
+mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a};
 mxGraphHandler.prototype.checkPreview=function(){this.livePreviewActive&&this.cloning?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?this.cloning&&this.livePreviewActive||(this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds))};
 mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(b.isConsumed()||!c.isMouseDown||null==this.cell||null==this.first||null==this.bounds||this.suspended)!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||b.isConsumed()||null==b.getState()&&null==b.sourceState||c.isMouseDown||(d=c.getCursorForMouseEvent(b),null==d&&c.isEnabled()&&c.isCellMovable(b.getCell())&&(d=c.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=
 d&&null!=b.sourceState&&b.sourceState.setCursor(d));else if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{var d=this.getDelta(b),e=c.tolerance;if(null!=this.shape||this.livePreviewActive||Math.abs(d.x)>e||Math.abs(d.y)>e){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));var e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=c.isGridEnabledEvent(b.getEvent()),g=b.getCell(),k=!0,l=null;this.cloning=e;c.isDropEnabled()&&
@@ -1841,7 +1840,7 @@ mxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a
 mxTooltipHandler.prototype.destroy=function(){this.destroyed||(this.graph.removeMouseListener(this),mxEvent.release(this.div),null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.destroyed=!0,this.div=null)};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
 mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
 function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.opacity=mxConstants.HIGHLIGHT_OPACITY,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var a=this.graph.view.getState(this.state.cell);null==a?this.hide():(this.state=a,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,
-this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=!0;mxCellHighlight.prototype.state=null;
+this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=null;mxCellHighlight.prototype.state=null;
 mxCellHighlight.prototype.spacing=2;mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();this.keepOnTop||this.shape.node.parentNode.firstChild==this.shape.node||this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
 mxCellHighlight.prototype.createShape=function(){var a=this.graph.cellRenderer.createShape(this.state);a.svgStrokeTolerance=this.graph.tolerance;a.points=this.state.absolutePoints;a.apply(this.state);a.stroke=this.highlightColor;a.opacity=this.opacity;a.isDashed=this.dashed;a.isShadow=!1;a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);this.graph.dialect!=
 mxConstants.DIALECT_SVG?a.pointerEvents=!1:a.svgPointerEvents="stroke";return a};mxCellHighlight.prototype.getStrokeWidth=function(a){return this.strokeWidth};
@@ -2049,12 +2048,12 @@ Editor.prototype.setFilename=function(a){this.filename=a};
 Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var k=[],c=0;c<
 e.length;c++)null!=a.view.getState(e[c])&&k.push(e[c]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
 OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,d,k,l,q,c,f,g,p){var m=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(m=80);e+=m;d+=m;var n=e,v=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var u=t.height,F=Math.max(1,Math.round((t.width-e-64)/2)),D=Math.max(1,Math.round((u-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,u-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=u+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";F+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var B=a.createDiv(f?"geTransDialog":
-"geDialog");k=this.getPosition(F,D,e,d);F=k.x;D=k.y;B.style.width=e+"px";B.style.height=d+"px";B.style.left=F+"px";B.style.top=D+"px";B.style.zIndex=this.zIndex;B.appendChild(b);document.body.appendChild(B);!c&&b.clientHeight>B.clientHeight-64&&(b.style.overflowY="auto");if(l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=D+14+"px",l.style.left=F+e+38-m+"px",l.style.zIndex=
-this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,!p)){var A=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){A=!0}),null,mxUtils.bind(this,function(c){A&&(a.hideDialog(!0),A=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var f=g();null!=f&&(n=e=f.w,v=d=f.h)}f=mxUtils.getDocumentSize();u=f.height;this.bg.style.height=u+"px";F=Math.max(1,Math.round((f.width-e-64)/2));D=Math.max(1,
-Math.round((u-d-a.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;d=Math.min(v,u-64);f=this.getPosition(F,D,e,d);F=f.x;D=f.y;B.style.left=F+"px";B.style.top=D+"px";B.style.width=e+"px";B.style.height=d+"px";!c&&b.clientHeight>B.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=F+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
-B;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,e,d,k,l,q,c,f,g,p){var m=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(m=80);e+=m;d+=m;var n=e,v=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var u=t.height,F=Math.max(1,Math.round((t.width-e-64)/2)),B=Math.max(1,Math.round((u-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,u-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=u+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";F+=t.x;B+=t.y;k&&document.body.appendChild(this.bg);var C=a.createDiv(f?"geTransDialog":
+"geDialog");k=this.getPosition(F,B,e,d);F=k.x;B=k.y;C.style.width=e+"px";C.style.height=d+"px";C.style.left=F+"px";C.style.top=B+"px";C.style.zIndex=this.zIndex;C.appendChild(b);document.body.appendChild(C);!c&&b.clientHeight>C.clientHeight-64&&(b.style.overflowY="auto");if(l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=B+14+"px",l.style.left=F+e+38-m+"px",l.style.zIndex=
+this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,!p)){var A=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){A=!0}),null,mxUtils.bind(this,function(c){A&&(a.hideDialog(!0),A=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var f=g();null!=f&&(n=e=f.w,v=d=f.h)}f=mxUtils.getDocumentSize();u=f.height;this.bg.style.height=u+"px";F=Math.max(1,Math.round((f.width-e-64)/2));B=Math.max(1,
+Math.round((u-d-a.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;d=Math.min(v,u-64);f=this.getPosition(F,B,e,d);F=f.x;B=f.y;C.style.left=F+"px";C.style.top=B+"px";C.style.width=e+"px";C.style.height=d+"px";!c&&b.clientHeight>C.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=B+14+"px",this.dialogImg.style.left=F+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
+C;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
 Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
 "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
 Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2082,23 +2081,23 @@ l.appendChild(g);mxUtils.write(l,mxResources.get("gridSize")+":");var m=document
 ":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){v=a;e()});mxEvent.consume(c)});e();l.appendChild(n);k.appendChild(l);c.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var t=
 mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&l.appendChild(t);var u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==m.value&&d.setGridSize(parseInt(m.value));var c=new ChangePageSetup(a,p,v,f.get());c.ignoreColor=d.background==p;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
 c.ignoreColor&&c.ignoreImage||d.model.execute(c)});u.className="geBtn gePrimaryBtn";l.appendChild(u);a.editor.cancelFirst||l.appendChild(t);k.appendChild(l);c.appendChild(k);q.appendChild(c);this.container=q};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,d,b){if(b||m!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<t.length;d++)b=t[d],B?"custom"==b.key&&(c.value=b.key,B=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,d,b){if(b||m!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<t.length;d++)b=t[d],C?"custom"==b.key&&(c.value=b.key,C=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
 e.height==b.format.height?(c.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(c.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(f.style.display="",p.style.display="none"):(m.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
 c.value="custom",f.style.display="none",p.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var c=document.createElement("select");c.style.marginBottom="8px";c.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";
 f.style.height="24px";l.style.marginRight="6px";f.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));f.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";f.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var m=document.createElement("input");
-m.setAttribute("size","7");m.style.textAlign="right";p.appendChild(m);mxUtils.write(p," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in");f.style.display="none";p.style.display="none";for(var v={},t=PageSetupDialog.getFormats(),u=0;u<t.length;u++){var F=t[u];v[F.key]=F;var D=document.createElement("option");D.setAttribute("value",F.key);mxUtils.write(D,F.title);c.appendChild(D)}var B=!1;k();a.appendChild(c);mxUtils.br(a);
+m.setAttribute("size","7");m.style.textAlign="right";p.appendChild(m);mxUtils.write(p," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in");f.style.display="none";p.style.display="none";for(var v={},t=PageSetupDialog.getFormats(),u=0;u<t.length;u++){var F=t[u];v[F.key]=F;var B=document.createElement("option");B.setAttribute("value",F.key);mxUtils.write(B,F.title);c.appendChild(B)}var C=!1;k();a.appendChild(c);mxUtils.br(a);
 a.appendChild(f);a.appendChild(p);var A=e,x=function(a,b){var g=v[c.value];null!=g.format?(m.value=g.format.width/100,n.value=g.format.height/100,p.style.display="none",f.style.display=""):(f.style.display="none",p.style.display="");g=parseFloat(m.value);if(isNaN(g)||0>=g)m.value=e.width/100;g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),Math.floor(100*parseFloat(n.value)));"custom"!=c.value&&q.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));b&&B||g.width==A.width&&g.height==A.height||(A=g,null!=d&&d(A))};mxEvent.addListener(b,"click",function(a){l.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(m,"blur",x);mxEvent.addListener(m,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(q,"change",x);mxEvent.addListener(l,"change",x);mxEvent.addListener(c,"change",function(a){B="custom"==c.value;
+g.height,g.width));b&&C||g.width==A.width&&g.height==A.height||(A=g,null!=d&&d(A))};mxEvent.addListener(b,"click",function(a){l.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(m,"blur",x);mxEvent.addListener(m,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(q,"change",x);mxEvent.addListener(l,"change",x);mxEvent.addListener(c,"change",function(a){C="custom"==c.value;
 x(a,!0)});x();return{set:function(a){e=a;k(null,null,!0)},get:function(){return A},widthInput:m,heightInput:n}};
 PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
 format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
 {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
 var FilenameDialog=function(a,b,e,d,k,l,q,c,f,g,p,m){f=null!=f?f:!0;var n,v,t=document.createElement("table"),u=document.createElement("tbody");t.style.marginTop="8px";n=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=p?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");n.appendChild(v);var F=document.createElement("input");F.setAttribute("value",b||"");F.style.marginLeft="4px";F.style.width=null!=m?m+
-"px":"180px";var D=mxUtils.button(e,function(){if(null==l||l(F.value))f&&a.hideDialog(),d(F.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=F,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td");
+"px":"180px";var B=mxUtils.button(e,function(){if(null==l||l(F.value))f&&a.hideDialog(),d(F.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=F,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),B.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td");
 v.style.whiteSpace="nowrap";v.appendChild(F);n.appendChild(v);if(null!=k||null==q)u.appendChild(n),null!=p&&(null!=a.editor.diagramFileTypes&&(n=FilenameDialog.createFileTypes(a,F,a.editor.diagramFileTypes),n.style.marginLeft="6px",n.style.width="74px",v.appendChild(n),F.style.width=null!=m?m-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,F,p)));null!=q&&(n=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(q),n.appendChild(v),u.appendChild(n));n=
-document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&v.appendChild(p);null!=c&&(m=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),m.className="geBtn",v.appendChild(m));mxEvent.addListener(F,"keypress",function(a){13==a.keyCode&&D.click()});
-v.appendChild(D);a.editor.cancelFirst||v.appendChild(p);n.appendChild(v);u.appendChild(n);t.appendChild(u);this.container=t};FilenameDialog.filenameHelpLink=null;
+document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&v.appendChild(p);null!=c&&(m=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),m.className="geBtn",v.appendChild(m));mxEvent.addListener(F,"keypress",function(a){13==a.keyCode&&B.click()});
+v.appendChild(B);a.editor.cancelFirst||v.appendChild(p);n.appendChild(v);u.appendChild(n);t.appendChild(u);this.container=t};FilenameDialog.filenameHelpLink=null;
 FilenameDialog.createTypeHint=function(a,b,e){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var k=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<e.length;a++)if(0<e[a].ext.length&&b.value.toLowerCase().substring(b.value.length-e[a].ext.length-1)=="."+e[a].ext){d.setAttribute("src",
 mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(e[a].title));break}};mxEvent.addListener(b,"keyup",k);mxEvent.addListener(b,"change",k);mxEvent.addListener(d,"click",function(b){var e=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&a.showError(null,e,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
 mxEvent.consume(b)});k();return d};
@@ -2129,13 +2128,13 @@ function(a,c){return l||q.apply(this,arguments)};this.keydownHandler=mxUtils.bin
 this.keyupHandler);var c=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return c.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var f=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return f.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
 mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var g=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return l||g.apply(this,arguments)};var p=!1,m=null,n=null,v=null,t=mxUtils.bind(this,function(){if(null!=this.toolbar&&p!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=f}a=this.toolbar.fontMenu;
 f=this.toolbar.sizeMenu;if(null==v)this.toolbar.createTextToolbar();else{for(var b=0;b<v.length;b++)this.toolbar.container.appendChild(v[b]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}p=d.cellEditor.isContentEditing();m=a;n=f;v=c}}),u=this,F=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){F.apply(this,arguments);t();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=
-c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=u.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));u.toolbar.setFontName(f);u.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var D=
-d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{D.apply(this,arguments),t()}catch(K){u.handleError(K)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(I){}var B=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();B.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=
+c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=u.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));u.toolbar.setFontName(f);u.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var B=
+d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{B.apply(this,arguments),t()}catch(K){u.handleError(K)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(I){}var C=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();C.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=
 mxUtils.bind(this,function(a,c,d){this.menus.createPopupMenu(a,c,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var A="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var f=
 a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),m=null!=e?e.split(";"):[],e=0;e<m.length;e++){var p=m[e],n=p.indexOf("=");if(0<=n){g=p.substring(0,n);var u=p.substring(n+1);null!=b[g]&&"none"==u&&(a.push(u),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",a,"cells",[c.cell]))}}catch(da){this.handleError(da)}};
-this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],G="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),C=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
-["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<C.length;a++)for(b=0;b<C[a].length;b++)A.push(C[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(A,x[a])&&A.push(x[a]);var J=function(a,c){var f=d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var m=f.getStyle(g),p=null!=m?m.split(";"):[];e=A.slice();for(var n=0;n<p.length;n++){var u=p[n],t=u.indexOf("=");if(0<=t){var y=u.substring(0,t),v=mxUtils.indexOf(e,
-y);0<=v&&e.splice(v,1);for(var l=0;l<C.length;l++){var k=C[l];if(0<=mxUtils.indexOf(k,y))for(var D=0;D<k.length;D++){var q=mxUtils.indexOf(e,k[D]);0<=q&&e.splice(q,1)}}}}}for(var F=f.isEdge(g),B=F?d.currentEdgeStyle:d.currentVertexStyle,E=f.getStyle(g),n=0;n<e.length;n++){var y=e[n],G=B[y];null==G||"shape"==y&&!F||F&&!(0>mxUtils.indexOf(x,y))||(E=mxUtils.setStyle(E,y,G))}f.setStyle(g,E)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){J(c.getProperty("cells"))});d.addListener("textInserted",
+this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],G="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
+["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(b=0;b<D[a].length;b++)A.push(D[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(A,x[a])&&A.push(x[a]);var J=function(a,c){var f=d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var m=f.getStyle(g),p=null!=m?m.split(";"):[];e=A.slice();for(var n=0;n<p.length;n++){var u=p[n],t=u.indexOf("=");if(0<=t){var y=u.substring(0,t),v=mxUtils.indexOf(e,
+y);0<=v&&e.splice(v,1);for(var l=0;l<D.length;l++){var k=D[l];if(0<=mxUtils.indexOf(k,y))for(var B=0;B<k.length;B++){var q=mxUtils.indexOf(e,k[B]);0<=q&&e.splice(q,1)}}}}}for(var F=f.isEdge(g),C=F?d.currentEdgeStyle:d.currentVertexStyle,E=f.getStyle(g),n=0;n<e.length;n++){var y=e[n],G=C[y];null==G||"shape"==y&&!F||F&&!(0>mxUtils.indexOf(x,y))||(E=mxUtils.setStyle(E,y,G))}f.setStyle(g,E)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){J(c.getProperty("cells"))});d.addListener("textInserted",
 function(a,c){J(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));J(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=c.getProperty("keys"),m=c.getProperty("values"),
 e=0;e<f.length;e++){var p=0<=mxUtils.indexOf(E,f[e]);if("strokeColor"!=f[e]||null!=m[e]&&"none"!=m[e])if(0<=mxUtils.indexOf(x,f[e]))g||0<=mxUtils.indexOf(G,f[e])?null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]:b&&0<=mxUtils.indexOf(A,f[e])&&(null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=m[e]);else if(0<=mxUtils.indexOf(A,f[e])){if(b||p)null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=m[e];if(g||p||0<=mxUtils.indexOf(G,f[e]))null==
 m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||
@@ -2174,20 +2173,20 @@ function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoom
 mxResources.get("fit"));var n=null,v=null,t=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=v&&(window.clearTimeout(v),
 fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=l(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
 null}));var f=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){F.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(l);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||l(mxUtils.bind(this,function(c){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var B=this.lightboxToolbarActions[m];l(B.fn,B.icon,B.tooltip)}null!=k.refreshBtn&&l(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),B=a.getModel();B.addListener(mxEvent.CHANGE,function(){F.style.display=1<B.getChildCount(B.root)?"":"none"})}this.addChromelessToolbarItems(l);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||l(mxUtils.bind(this,function(c){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var C=this.lightboxToolbarActions[m];l(C.fn,C.icon,C.tooltip)}null!=k.refreshBtn&&l(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
 window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&l(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&l(mxUtils.bind(this,
 function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
 u(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
 u(30)}));var A=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<A&&Math.abs(this.scrollTop-a.container.scrollTop)<A&&Math.abs(this.startX-f.getGraphX())<A&&Math.abs(this.startY-f.getGraphY())<
 A&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?t():u(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}x.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
 function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=
-c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),C=a.view.getDrawPane();a.cumulativeZoomFactor=1;var J=null,I=null,y=null,K=null,z=function(c){null!=J&&window.clearTimeout(J);window.setTimeout(function(){a.isMouseDown||(J=window.setTimeout(mxUtils.bind(this,
-function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),C.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(C.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){C.style.transform="";G.style.transform=""},0)):(C.style.transform=
+c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),D=a.view.getDrawPane();a.cumulativeZoomFactor=1;var J=null,I=null,y=null,K=null,z=function(c){null!=J&&window.clearTimeout(J);window.setTimeout(function(){a.isMouseDown||(J=window.setTimeout(mxUtils.bind(this,
+function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),D.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(D.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){D.style.transform="";G.style.transform=""},0)):(D.style.transform=
 "",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,m=0;null!=I&&(g=a.container.offsetWidth/2-I.x+f.x,m=a.container.offsetHeight/2-I.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=y&&(g+=c.x-y.x,m+=c.y-y.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),m*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
-0==g&&0==m||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=m*(a.cumulativeZoomFactor-1)));null!=K&&C.setAttribute("filter",K);a.cumulativeZoomFactor=1;K=I=y=J=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(I=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+0==g&&0==m||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=m*(a.cumulativeZoomFactor-1)));null!=K&&D.setAttribute("filter",K);a.cumulativeZoomFactor=1;K=I=y=J=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(I=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
 (this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==K&&""!=C.getAttribute("filter")&&(K=C.getAttribute("filter"),C.removeAttribute("filter"));y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:I.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:I.y+a.container.scrollTop-a.container.offsetTop;C.style.transformOrigin=c+"px "+b+"px";C.style.transform="scale("+
+this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==K&&""!=D.getAttribute("filter")&&(K=D.getAttribute("filter"),D.removeAttribute("filter"));y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:I.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:I.y+a.container.scrollTop-a.container.offsetTop;D.style.transformOrigin=c+"px "+b+"px";D.style.transform="scale("+
 this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":I.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":I.y+
 a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}z(d)};mxEvent.addGestureListeners(a.container,function(a){null!=J&&window.clearTimeout(J)},null,function(c){1!=a.cumulativeZoomFactor&&z(0)});mxEvent.addListener(a.container,"scroll",function(){J&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
 z(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c)){d=a.view.getTranslate();var b=40/a.view.scale;mxEvent.isShiftDown(c)?a.view.setTranslate(d.x+(f?-b:b),d.y):a.view.setTranslate(d.x,d.y+(f?b:-b))}else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),I=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),
@@ -2283,12 +2282,12 @@ u<e.length-1&&0<=u&&(m=0==Math.round(e[u].x-e[u+1].x)?"col-resize":"row-resize")
 this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
 function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],f=this.graph.pageFormat,d=this.graph.pageScale,b=f.width*d,f=f.height*d,d=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),p=0;p<g.width;p++)c.push(new mxRectangle(((g.x+p)*b+d.x)*e,(g.y*f+d.y)*e,b*e,f*e));for(p=1;p<g.height;p++)c.push(new mxRectangle((g.x*b+d.x)*e,((g.y+p)*f+d.y)*e,b*e,f*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
 function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=n.apply(this,arguments),f=new mxDictionary,d=[],b=0;b<c.length;b++){var e=this.graph.getCompositeParent(c[b]);null==e||f.get(e)||
-(f.put(e,!0),d.push(e))}return d};var v=this.graphHandler.start;this.graphHandler.start=function(a,c,f,d){a=this.graph.getCompositeParent(a);v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var u=(new Date).getTime(),F=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
-function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(u=(new Date).getTime(),F=0):F=(new Date).getTime()-u};var B=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<F||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&B.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,
+(f.put(e,!0),d.push(e))}return d};var v=this.graphHandler.start;this.graphHandler.start=function(a,c,f,d){a=this.graph.getCompositeParent(a);v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var u=(new Date).getTime(),F=0,B=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
+function(){var a=this.currentState;B.apply(this,arguments);a!=this.currentState?(u=(new Date).getTime(),F=0):F=(new Date).getTime()-u};var C=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<F||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,
 arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,
 function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||
 a.isConsumed())return G.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};
-var C=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return C.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(f,c);return f};this.getAllCells=function(a,c,f,d,b,e){e=null!=e?e:[];if(0<f||0<d){var g=this.getModel(),m=a+f,p=c+d;null==b&&(b=this.getCurrentRoot(),null==b&&(b=
+var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(f,c);return f};this.getAllCells=function(a,c,f,d,b,e){e=null!=e?e:[];if(0<f||0<d){var g=this.getModel(),m=a+f,p=c+d;null==b&&(b=this.getCurrentRoot(),null==b&&(b=
 g.getRoot()));if(null!=b)for(var n=g.getChildCount(b),u=0;u<n;u++){var t=g.getChildAt(b,u),y=this.view.getState(t);if(null!=y&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var z=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=z&&(y=mxUtils.getBoundingBox(y,z));(g.isEdge(t)||g.isVertex(t))&&y.x>=a&&y.y+y.height<=p&&y.y>=c&&y.x+y.width<=m&&e.push(t);this.getAllCells(a,c,f,d,t,e)}}}return e};var J=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
 function(a,c,f){return this.graph.isCellSelected(a)?!1:J.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var I=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();I=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:
 this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),d=c.getProperty("cell");null==d?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),t.start(f.x,f.y)):null!=I?this.addSelectionCells(I):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);I=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||
@@ -2298,7 +2297,7 @@ Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarni
 Graph.createSvgImage=function(a,b,e,d,k){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=d&&null!=k?'viewBox="0 0 '+d+" "+k+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
 Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a,b){var e=mxUtils.getXml(a);return Graph.compress(b?e:Graph.zapGremlins(e))};
 Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var e=b?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(e):Base64.encode(e,!0)};Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
-Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="",a.style.color="#000000",a.style.color=""),a=a.nextSibling};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
+Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
 mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
 Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";
 Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;
@@ -2407,11 +2406,11 @@ this.graph.getCellGeometry(n[k]),F=g.width-p.x-p.width,u=u.clone();u.width=u.wid
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var f=this.getState(a);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=b.apply(this,
 arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
 1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var b=function(c,f,b){var e=new mxPoint(f,b);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=f||e.y!=b},e=.5*this.scale,f=!1,d=[],t=0;t<c.length-1;t++){for(var u=
-c[t+1],k=c[t],l=[],q=c[t+2];t<c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,u.x,u.y)<1*this.scale*this.scale;)u=q,t++,q=c[t+2];for(var f=b(0,k.x,k.y)||f,A=0;A<this.validEdges.length;A++){var x=this.validEdges[A],E=x.absolutePoints;if(null!=E&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<E.length-1;x++){for(var G=E[x+1],C=E[x],q=E[x+2];x<E.length-2&&mxUtils.ptSegDistSq(C.x,C.y,q.x,q.y,G.x,G.y)<1*this.scale*this.scale;)G=q,x++,q=E[x+2];q=mxUtils.intersection(k.x,k.y,u.x,u.y,C.x,C.y,G.x,
-G.y);if(null!=q&&(Math.abs(q.x-k.x)>e||Math.abs(q.y-k.y)>e)&&(Math.abs(q.x-u.x)>e||Math.abs(q.y-u.y)>e)&&(Math.abs(q.x-C.x)>e||Math.abs(q.y-C.y)>e)&&(Math.abs(q.x-G.x)>e||Math.abs(q.y-G.y)>e)){G=q.x-k.x;C=q.y-k.y;q={distSq:G*G+C*C,x:q.x,y:q.y};for(G=0;G<l.length;G++)if(l[G].distSq>q.distSq){l.splice(G,0,q);q=null;break}null==q||0!=l.length&&l[l.length-1].x===q.x&&l[l.length-1].y===q.y||l.push(q)}}}for(x=0;x<l.length;x++)f=b(1,l[x].x,l[x].y)||f}q=c[c.length-1];f=b(0,q.x,q.y)||f}a.routedPoints=d;return f}return!1};
+c[t+1],k=c[t],l=[],q=c[t+2];t<c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,u.x,u.y)<1*this.scale*this.scale;)u=q,t++,q=c[t+2];for(var f=b(0,k.x,k.y)||f,A=0;A<this.validEdges.length;A++){var x=this.validEdges[A],E=x.absolutePoints;if(null!=E&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<E.length-1;x++){for(var G=E[x+1],D=E[x],q=E[x+2];x<E.length-2&&mxUtils.ptSegDistSq(D.x,D.y,q.x,q.y,G.x,G.y)<1*this.scale*this.scale;)G=q,x++,q=E[x+2];q=mxUtils.intersection(k.x,k.y,u.x,u.y,D.x,D.y,G.x,
+G.y);if(null!=q&&(Math.abs(q.x-k.x)>e||Math.abs(q.y-k.y)>e)&&(Math.abs(q.x-u.x)>e||Math.abs(q.y-u.y)>e)&&(Math.abs(q.x-D.x)>e||Math.abs(q.y-D.y)>e)&&(Math.abs(q.x-G.x)>e||Math.abs(q.y-G.y)>e)){G=q.x-k.x;D=q.y-k.y;q={distSq:G*G+D*D,x:q.x,y:q.y};for(G=0;G<l.length;G++)if(l[G].distSq>q.distSq){l.splice(G,0,q);q=null;break}null==q||0!=l.length&&l[l.length-1].x===q.x&&l[l.length-1].y===q.y||l.push(q)}}}for(x=0;x<l.length;x++)f=b(1,l[x].x,l[x].y)||f}q=c[c.length-1];f=b(0,q.x,q.y)||f}a.routedPoints=d;return f}return!1};
 var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,b=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,
-"jumpStyle","none"),g=!0,p=null,l=null,q=[],B=null;a.begin();for(var A=0;A<this.state.routedPoints.length;A++){var x=this.state.routedPoints[A],E=new mxPoint(x.x/this.scale,x.y/this.scale);0==A?E=c[0]:A==this.state.routedPoints.length-1&&(E=c[c.length-1]);var G=!1;if(null!=p&&1==x.type){var C=this.state.routedPoints[A+1],x=C.x/this.scale-E.x,C=C.y/this.scale-E.y,x=x*x+C*C;null==B&&(B=new mxPoint(E.x-p.x,E.y-p.y),l=Math.sqrt(B.x*B.x+B.y*B.y),0<l?(B.x=B.x*b/l,B.y=B.y*b/l):B=null);x>b*b&&0<l&&(x=p.x-
-E.x,C=p.y-E.y,x=x*x+C*C,x>b*b&&(G=new mxPoint(E.x-B.x,E.y-B.y),x=new mxPoint(E.x+B.x,E.y+B.y),q.push(G),this.addPoints(a,q,d,f,!1,null,g),q=0>Math.round(B.x)||0==Math.round(B.x)&&0>=Math.round(B.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(G.x-B.y*q,G.y+B.x*q),a.lineTo(x.x-B.y*q,x.y+B.x*q),a.lineTo(x.x,x.y)):"arc"==e?(q*=1.3,a.curveTo(G.x-B.y*q,G.y+B.x*q,x.x-B.y*q,x.y+B.x*q,x.x,x.y)):(a.moveTo(x.x,x.y),g=!0),q=[x],G=!0))}else B=null;G||(q.push(E),p=E)}this.addPoints(a,q,d,f,!1,null,g);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;
+"jumpStyle","none"),g=!0,p=null,l=null,q=[],C=null;a.begin();for(var A=0;A<this.state.routedPoints.length;A++){var x=this.state.routedPoints[A],E=new mxPoint(x.x/this.scale,x.y/this.scale);0==A?E=c[0]:A==this.state.routedPoints.length-1&&(E=c[c.length-1]);var G=!1;if(null!=p&&1==x.type){var D=this.state.routedPoints[A+1],x=D.x/this.scale-E.x,D=D.y/this.scale-E.y,x=x*x+D*D;null==C&&(C=new mxPoint(E.x-p.x,E.y-p.y),l=Math.sqrt(C.x*C.x+C.y*C.y),0<l?(C.x=C.x*b/l,C.y=C.y*b/l):C=null);x>b*b&&0<l&&(x=p.x-
+E.x,D=p.y-E.y,x=x*x+D*D,x>b*b&&(G=new mxPoint(E.x-C.x,E.y-C.y),x=new mxPoint(E.x+C.x,E.y+C.y),q.push(G),this.addPoints(a,q,d,f,!1,null,g),q=0>Math.round(C.x)||0==Math.round(C.x)&&0>=Math.round(C.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(G.x-C.y*q,G.y+C.x*q),a.lineTo(x.x-C.y*q,x.y+C.x*q),a.lineTo(x.x,x.y)):"arc"==e?(q*=1.3,a.curveTo(G.x-C.y*q,G.y+C.x*q,x.x-C.y*q,x.y+C.x*q,x.x,x.y)):(a.moveTo(x.x,x.y),g=!0),q=[x],G=!0))}else C=null;G||(q.push(E),p=E)}this.addPoints(a,q,d,f,!1,null,g);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;
 mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,d,b){if(null==c||null==a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,b);var f=this.getNextPoint(a,d,b),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),f=mxUtils.getRotatedPoint(f,p,k,m);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
 0);p+=parseFloat(a.style[b?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(c,f,0==g&&e,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),f=mxUtils.getRotatedPoint(f,p,k,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,d,b,f),b)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,d,b,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,
 a[f]);if(null!=g){var m=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==b||m<b)d=g,b=m}}null!=d&&(e=d)}return e};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,d){var f=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(f=d.state.view.graph.replacePlaceholders(d.state.cell,f));return f};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var f=
@@ -2474,8 +2473,8 @@ function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown
 this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==y)throw Error(mxResources.get("drawingEmpty"));var t=this.view.scale,z=mxUtils.createXmlDocument(),l=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"svg"):z.createElement("svg");null!=a&&(null!=l.style?l.style.backgroundColor=a:l.setAttribute("style","background-color:"+a));null==z.createElementNS?(l.setAttribute("xmlns",mxConstants.NS_SVG),l.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):l.setAttributeNS("http://www.w3.org/2000/xmlns/",
 "xmlns:xlink",mxConstants.NS_XLINK);a=c/t;var v=Math.max(1,Math.ceil(y.width*a)+2*f)+(n?5:0),k=Math.max(1,Math.ceil(y.height*a)+2*f)+(n?5:0);l.setAttribute("version","1.1");l.setAttribute("width",v+"px");l.setAttribute("height",k+"px");l.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+v+" "+k);z.appendChild(l);var K=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"g"):z.createElement("g");l.appendChild(K);var L=this.createSvgCanvas(K);L.foOffset=d?-.5:0;L.textOffset=d?-.5:0;L.imageOffset=
 d?-.5:0;L.translate(Math.floor((f/c-y.x)/t),Math.floor((f/c-y.y)/t));var q=document.createElement("div"),x=L.getAlternateText;L.getAlternateText=function(a,c,f,b,d,e,g,m,p,n,u,y,ia){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(q.innerHTML=e,e=mxUtils.extractTextWithWhitespace(q.childNodes));for(var Na=Math.ceil(2*b/this.state.fontSize),t=[],La=0,z=0;(0==Na||La<Na)&&z<e.length;){var l=e.charCodeAt(z);if(10==l||13==l){if(0<La)break}else t.push(e.charAt(z)),255>l&&La++;z++}t.length<
-e.length&&1<e.length-t.length&&(e=mxUtils.trim(t.join(""))+"...");return e}catch(Ua){return x.apply(this,arguments)}else return x.apply(this,arguments)};var P=this.backgroundImage;if(null!=P){c=t/c;var H=this.view.translate,M=new mxRectangle(H.x*c,H.y*c,P.width*c,P.height*c);mxUtils.intersects(y,M)&&L.image(H.x,H.y,P.width,P.height,P.src,!0)}L.scale(a);L.textEnabled=g;m=null!=m?m:this.createSvgImageExport();var D=m.drawCellState,F=m.getLinkForCellState;m.getLinkForCellState=function(a,c){var f=F.apply(this,
-arguments);return null==f||a.view.graph.isCustomLink(f)?null:f};m.drawCellState=function(a,c){for(var f=a.view.graph,b=f.isCellSelected(a.cell),d=f.model.getParent(a.cell);!e&&!b&&null!=d;)b=f.isCellSelected(d),d=f.model.getParent(d);(e||b)&&D.apply(this,arguments)};m.drawState(this.getView().getState(this.model.root),L);this.updateSvgLinks(l,p,!0);this.addForeignObjectWarning(L,l);return l}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+e.length&&1<e.length-t.length&&(e=mxUtils.trim(t.join(""))+"...");return e}catch(Ua){return x.apply(this,arguments)}else return x.apply(this,arguments)};var P=this.backgroundImage;if(null!=P){c=t/c;var H=this.view.translate,B=new mxRectangle(H.x*c,H.y*c,P.width*c,P.height*c);mxUtils.intersects(y,B)&&L.image(H.x,H.y,P.width,P.height,P.src,!0)}L.scale(a);L.textEnabled=g;m=null!=m?m:this.createSvgImageExport();var M=m.drawCellState,F=m.getLinkForCellState;m.getLinkForCellState=function(a,c){var f=F.apply(this,
+arguments);return null==f||a.view.graph.isCustomLink(f)?null:f};m.drawCellState=function(a,c){for(var f=a.view.graph,b=f.isCellSelected(a.cell),d=f.model.getParent(a.cell);!e&&!b&&null!=d;)b=f.isCellSelected(d),d=f.model.getParent(d);(e||b)&&M.apply(this,arguments)};m.drawState(this.getView().getState(this.model.root),L);this.updateSvgLinks(l,p,!0);this.addForeignObjectWarning(L,l);return l}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
 function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var f=a.createElement("switch"),b=a.createElement("g");b.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",
 Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,Graph.foreignObjectWarningText);f.appendChild(b);d.appendChild(e);f.appendChild(d);c.appendChild(f)}};Graph.prototype.updateSvgLinks=function(a,c,f){a=a.getElementsByTagName("a");for(var b=0;b<a.length;b++){var d=a[b].getAttribute("href");
 null==d&&(d=a[b].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[b].setAttribute("target",c):f&&this.isCustomLink(d)&&a[b].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
@@ -2514,12 +2513,12 @@ c){this.graph.getModel().beginUpdate();try{t.apply(this,arguments),""==c&&this.g
 mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var u=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,f,b,d,e){mxEvent.isAltDown(e)&&(d=null);u.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
 function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/d-f.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(f,d);this.hint.style.left=this.pBounds.x+this.currentDx+
 Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var F=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){f.get(a)||(f.put(a,!0),d.push(a))}for(var c=F.apply(this,arguments),f=
-new mxDictionary,b=this.graph.model,d=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(b.getParent(b.getParent(g))):this.graph.isTableRow(g)&&a(b.getParent(g));a(g)}return d};var D=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=D.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var B=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c=
-B.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var A=mxVertexHandler.prototype.getSelectionStrokeWidth;mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return this.graph.cellEditor.getEditingCell()!=this.state.cell&&(this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell))?2:A.apply(this,arguments)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
+new mxDictionary,b=this.graph.model,d=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(b.getParent(b.getParent(g))):this.graph.isTableRow(g)&&a(b.getParent(g));a(g)}return d};var B=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=B.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c=
+C.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var A=mxVertexHandler.prototype.getSelectionStrokeWidth;mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return this.graph.cellEditor.getEditingCell()!=this.state.cell&&(this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell))?2:A.apply(this,arguments)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
 function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(c.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,
 "recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var x=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return x.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?
 this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var E=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return E.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var G=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||G.apply(this,arguments)&&
-(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var C=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=C.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var J=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=J.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=
+(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var D=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=D.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var J=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=J.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=
 this.graph,f=c.model,b=c.getActualStartSize(this.state.cell),d=f.getChildAt(this.state.cell,0),e=this.state;null==a&&(a=[]);for(var g=0;g<f.getChildCount(this.state.cell)-1;g++)mxUtils.bind(this,function(b){if(null!=b&&f.isVertex(b.cell)){var d=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);b=new mxHandle(b,"row-resize",null,d);b.tableHandle=!0;var e=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild);b.redraw=function(){null!=this.shape&&null!=
 this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+e,this.shape.bounds.height=1,this.shape.node.style.zOrder=-1,this.shape.redraw())};b.setPosition=function(a,c,f){e=c.y-a.y-a.height};b.execute=function(){c.updateTableRowHeight(this.state.cell,e);e=0};a.push(b)}})(this.graph.view.getState(f.getChildAt(this.state.cell,g)));for(g=0;g<f.getChildCount(d)-1;g++)mxUtils.bind(this,function(c){if(null!=c){var f=new mxLine(new mxRectangle,
 mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);c=new mxHandle(c,"col-resize",null,f);c.tableHandle=!0;var d=0;c.shape.node.parentNode.insertBefore(c.shape.node,c.shape.node.parentNode.firstChild);c.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+d,this.shape.bounds.width=1,this.shape.bounds.y=e.y+b.y,this.shape.bounds.height=e.height-b.y-b.height,this.shape.redraw())};c.setPosition=function(a,c,f){d=c.x-a.x-a.width};c.execute=function(){this.graph.updateTableColumnWidth(this.state.cell,
@@ -2574,7 +2573,7 @@ null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.
 2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var fa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){fa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ya=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
 this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function q(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function v(){mxActor.call(this)}function t(a,c){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function D(){mxActor.call(this)}function B(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function C(){mxShape.call(this)}function J(){mxShape.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function B(){mxActor.call(this)}function C(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function D(){mxShape.call(this)}function J(){mxShape.call(this)}
 function I(){mxEllipse.call(this)}function y(){mxShape.call(this)}function K(){mxShape.call(this)}function z(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function P(){mxShape.call(this)}function H(){mxShape.call(this)}function S(){mxShape.call(this)}function ca(){mxShape.call(this)}function aa(){mxCylinder.call(this)}function da(){mxCylinder.call(this)}function ga(){mxRectangleShape.call(this)}function T(){mxDoubleEllipse.call(this)}function X(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);
 this.spacing=0}function ha(){mxArrowConnector.call(this);this.spacing=0}function V(){mxActor.call(this)}function U(){mxRectangleShape.call(this)}function Q(){mxActor.call(this)}function N(){mxActor.call(this)}function ba(){mxActor.call(this)}function O(){mxActor.call(this)}function Z(){mxActor.call(this)}function fa(){mxActor.call(this)}function ya(){mxActor.call(this)}function M(){mxActor.call(this)}function ja(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxEllipse.call(this)}
 function na(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function ka(){mxRhombus.call(this)}function qa(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ra(){mxActor.call(this)}function sa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Da(a,c,f,b,d,e,g,m,p,n){g+=p;var ia=b.clone();b.x-=d*(2*g+p);b.y-=e*(2*g+p);d*=g+p;e*=g+p;return function(){a.ellipse(ia.x-
@@ -2604,17 +2603,17 @@ mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEven
 b,f+d,c+b-e,f+d),a.lineTo(c+e,f+d),a.quadTo(c,f+d,c,f+d-e),a.lineTo(c,f+e),a.quadTo(c,f,c+e,f)):(a.moveTo(c,f),a.lineTo(c+b,f),a.lineTo(c+b,f+d),a.lineTo(c,f+d),a.lineTo(c,f)),a.close(),a.end(),a.fillAndStroke()}};var Ta=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,f,b,d){null==a.handJiggle&&Ta.apply(this,arguments)};mxUtils.extend(u,mxRectangleShape);u.prototype.size=.1;u.prototype.isHtmlAllowed=function(){return!1};u.prototype.getLabelBounds=
 function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,f=a.height;a=new mxRectangle(a.x,a.y,c,f);var b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,b=Math.max(b,Math.min(c*d,f*d));a.x+=
 Math.round(b);a.width-=Math.round(2*b)}return a};u.prototype.paintForeground=function(a,c,f,b,d){var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,f);a.lineTo(c+e,f+d);a.moveTo(c+b-e,f);a.lineTo(c+b-e,f+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",u);mxUtils.extend(F,mxRectangleShape);F.prototype.paintBackground=function(a,c,f,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,f,b,d);a.fill()};F.prototype.paintForeground=function(a,c,f,b,d){};mxCellRenderer.registerShape("transparent",F);mxUtils.extend(D,mxHexagon);D.prototype.size=30;D.prototype.position=.5;D.prototype.position2=.5;D.prototype.base=20;D.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*this.scale)};D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(a,c,f,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ia=Math.max(0,Math.min(b,
-parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-f),new mxPoint(Math.min(b,e+ia),d-f),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-f),new mxPoint(0,d-f)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",D);mxUtils.extend(B,mxActor);B.prototype.size=.2;B.prototype.fixedSize=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize",
-"0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("step",B);mxUtils.extend(A,mxHexagon);A.prototype.size=
+arguments)};mxCellRenderer.registerShape("process",u);mxUtils.extend(F,mxRectangleShape);F.prototype.paintBackground=function(a,c,f,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,f,b,d);a.fill()};F.prototype.paintForeground=function(a,c,f,b,d){};mxCellRenderer.registerShape("transparent",F);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*this.scale)};B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(a,c,f,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ia=Math.max(0,Math.min(b,
+parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-f),new mxPoint(Math.min(b,e+ia),d-f),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-f),new mxPoint(0,d-f)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",B);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize",
+"0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(A,mxHexagon);A.prototype.size=
 .25;A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*d),new mxPoint(b-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",A);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=
 function(){return!1};x.prototype.paintForeground=function(a,c,f,b,d){var e=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,f+e);a.lineTo(c+b/2,f+d-e);a.moveTo(c+e,f+d/2);a.lineTo(c+b-e,f+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Oa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
 0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,f,b,d){Oa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&(a.setShadow(!1),Oa.apply(this,[a,c,f,b,d]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==
 this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};E.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);
 var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var m=this.style["symbol"+e+"Align"],ia=this.style["symbol"+e+"VerticalAlign"],p=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,y=this.style["symbol"+e+"VSpacing"]||u,t=this.style["symbol"+e+"ArcSpacing"];null!=t&&(t*=this.getArcSize(b+this.strokewidth,d+this.strokewidth),u+=t,y+=t);var t=c,z=f,t=m==mxConstants.ALIGN_CENTER?t+(b-p)/2:m==mxConstants.ALIGN_RIGHT?t+
 (b-p-u):t+u,z=ia==mxConstants.ALIGN_MIDDLE?z+(d-n)/2:ia==mxConstants.ALIGN_BOTTOM?z+(d-n-y):z+y;a.save();m=new g;m.style=this.style;g.prototype.paintVertexShape.call(m,a,t,z,p,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(G,mxCylinder);G.prototype.redrawPath=function(a,c,f,b,d,e){e?(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),
-a.close())};mxCellRenderer.registerShape("message",G);mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",C);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
+a.close())};mxCellRenderer.registerShape("message",G);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
 6,0,0,0)};J.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,f+d);a.lineTo(c+7*b/8,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
 I);mxUtils.extend(y,mxShape);y.prototype.paintVertexShape=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",y);mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};K.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0,
 d/8,b,7*d/8);a.fillAndStroke()};K.prototype.paintForeground=function(a,c,f,b,d){a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",K);mxUtils.extend(z,mxRectangleShape);z.prototype.size=40;z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};z.prototype.paintBackground=
@@ -2624,11 +2623,11 @@ function(a,c,f,b,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this
 mxConstants.NONE?(this.getGradientBounds(a,c,f,b,d),a.setGradient(this.fill,this.gradient,c,f,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,f);a.lineTo(c+g,f);a.lineTo(c+g,f+Math.max(0,m-1.5*e));a.lineTo(c+Math.max(0,g-e),f+m);a.lineTo(c,f+m);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,f);a.lineTo(c+b,f);a.lineTo(c+b,f+d);a.lineTo(c,f+d);a.lineTo(c,f+m);a.stroke()};mxCellRenderer.registerShape("umlFrame",L);mxPerimeter.LifelinePerimeter=function(a,c,f,b){b=z.prototype.size;
 null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;f.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+b,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,f,b){b=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
 mxPerimeter.BackbonePerimeter=function(a,c,f,b){b=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(b+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return f.x<a.getCenterX()&&(b=-1*(b+1)),new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y,f.y)));f.y<a.getCenterY()&&(b=-1*(b+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,f.x)),
-a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,f,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",D.prototype.size))*c.view.scale))),c.style),c,f,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,f,b){var d=p.prototype.size;
+a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,f,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",B.prototype.size))*c.view.scale))),c.style),c,f,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,f,b){var d=p.prototype.size;
 null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,m=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+m,g+d),new mxPoint(e+m,g+n),new mxPoint(e,g+n-d),new mxPoint(e,g)]):(d=m*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+m,g),new mxPoint(e+m-d,g+n),new mxPoint(e,
 g+n),new mxPoint(e+d,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(f.x<e||f.x>e+m?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,f,b){var d=m.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,p=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
 c==mxConstants.DIRECTION_EAST?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+p-d,g),new mxPoint(e+p,g+n),new mxPoint(e,g+n),new mxPoint(e+d,g)]):c==mxConstants.DIRECTION_WEST?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+p,g),new mxPoint(e+p-d,g+n),new mxPoint(e+d,g+n),new mxPoint(e,g)]):c==mxConstants.DIRECTION_NORTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(e,g+d),new mxPoint(e+p,g),new mxPoint(e+p,g+n),new mxPoint(e,g+n-d),new mxPoint(e,g+d)]):(d=n*Math.max(0,
-Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+p,g+d),new mxPoint(e+p,g+n-d),new mxPoint(e,g+n),new mxPoint(e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(f.x<e||f.x>e+p?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?B.prototype.fixedSize:B.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,
+Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+p,g+d),new mxPoint(e+p,g+n-d),new mxPoint(e,g+n),new mxPoint(e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(f.x<e||f.x>e+p?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?C.prototype.fixedSize:C.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,
 "size",e));var g=a.x,m=a.y,p=a.width,n=a.height,u=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),m=[new mxPoint(g,m),new mxPoint(g+p-d,m),new mxPoint(g+p,a),new mxPoint(g+p-d,m+n),new mxPoint(g,m+n),new mxPoint(g+d,a),new mxPoint(g,m)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,
 Math.min(1,e)),m=[new mxPoint(g+d,m),new mxPoint(g+p,m),new mxPoint(g+p-d,a),new mxPoint(g+p,m+n),new mxPoint(g+d,m+n),new mxPoint(g,a),new mxPoint(g+d,m)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),m=[new mxPoint(g,m+d),new mxPoint(u,m),new mxPoint(g+p,m+d),new mxPoint(g+p,m+n),new mxPoint(u,m+n-d),new mxPoint(g,m+n),new mxPoint(g,m+d)]):(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),m=[new mxPoint(g,m),new mxPoint(u,m+d),new mxPoint(g+
 p,m),new mxPoint(g+p,m+n-d),new mxPoint(u,m+n),new mxPoint(g,m+n-d),new mxPoint(g,m)]);u=new mxPoint(u,a);b&&(f.x<g||f.x>g+p?u.y=f.y:u.x=f.x);return mxUtils.getPerimeterPoint(m,u,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,f,b){var d=A.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,m=a.width,p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
@@ -2690,23 +2689,23 @@ c.y-a.y)))},!1)]},umlFrame:function(a){return[R(a,["width","height"],function(a)
 Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[R(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},cross:function(a){return[R(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,
 mxUtils.getValue(this.state.style,"size",sa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var f=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/f*2,Math.max(0,a.getCenterX()-c.x)/f*2)))})]},note:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-
 c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[R(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",V.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));
-return c},dataStorage:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[R(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",D.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",D.prototype.position)));mxUtils.getValue(this.state.style,"base",D.prototype.base);return new mxPoint(a.x+f*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",D.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),R(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",D.prototype.position2)));
-return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),R(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",D.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",D.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",D.prototype.base)));return new mxPoint(a.x+Math.min(a.width,f*a.width+
-b),a.y+a.height-c)},function(a,c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",D.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-f*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},internalStorage:function(a){var c=[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+return c},dataStorage:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[R(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",B.prototype.position)));mxUtils.getValue(this.state.style,"base",B.prototype.base);return new mxPoint(a.x+f*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",B.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),R(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",B.prototype.position2)));
+return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),R(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",B.prototype.base)));return new mxPoint(a.x+Math.min(a.width,f*a.width+
+b),a.y+a.height-c)},function(a,c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-f*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},internalStorage:function(a){var c=[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
 "dy",U.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},module:function(a){return[R(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",aa.prototype.jettyWidth))),f=Math.max(0,Math.min(a.height,
 mxUtils.getValue(this.state.style,"jettyHeight",aa.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+2*f)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
 "dy",Q.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+f)},function(a,
 c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:xa(1),doubleArrow:xa(.5),folder:function(a){return[R(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,
 "tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+f)},function(a,c){var f=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=a.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
 "size",g.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[R(a,
-["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:Ea(B.prototype.size,!0,null,!0,B.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0),curlyBracket:Ea(n.prototype.size,!1),display:Ea(ta.prototype.size,!1),cube:Ka(1,a.prototype.size,!1),card:Ka(.5,c.prototype.size,!0),loopLimit:Ka(.5,
+["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0),curlyBracket:Ea(n.prototype.size,!1),display:Ea(ta.prototype.size,!1),cube:Ka(1,a.prototype.size,!1),card:Ka(.5,c.prototype.size,!0),loopLimit:Ka(.5,
 ja.prototype.size,!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=R;Graph.handleFactory=Fa;var Qa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Qa.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_RECTANGLE);c=Fa[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&
 (c=Fa[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Fa[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ga=new mxPoint(1,0),Ha=new mxPoint(1,0),xa=mxUtils.toRadians(-30),Ga=mxUtils.getRotatedPoint(Ga,
 Math.cos(xa),Math.sin(xa)),xa=mxUtils.toRadians(-150),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(xa),Math.sin(xa));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,m=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==m&&null!=c&&(m=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var p=Ga.x,n=Ga.y,u=Ha.x,y=Ha.y,t="horizontal"==mxUtils.getValue(a.style,"elbow",
 "horizontal");if(null!=g&&null!=m){a=function(a,c,f){a-=z.x;var b=c-z.y;c=(y*a-u*b)/(p*y-n*u);a=(n*a-p*b)/(n*u-p*y);t?(f&&(z=new mxPoint(z.x+p*c,z.y+n*c),d.push(z)),z=new mxPoint(z.x+u*a,z.y+y*a)):(f&&(z=new mxPoint(z.x+u*a,z.y+y*a),d.push(z)),z=new mxPoint(z.x+p*c,z.y+n*c));d.push(z)};var z=m;null==b&&(b=new mxPoint(m.x+(g.x-m.x)/2,m.y+(g.y-m.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ra=Graph.prototype.createEdgeHandler;
 Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(a);f.snapToTerminals=!1;return f}return Ra.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,c,f){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,f/(.5+b));c=(c-b)/2;f=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+b*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c+b,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,f+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.75*b));return a};D.prototype.getConstraints=function(a,c,f){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,
+0),!1,null,c+b,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,f+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.75*b));return a};B.prototype.getConstraints=function(a,c,f){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,
 "position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,c,.5*(f-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-b)));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,
 0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,
@@ -2726,12 +2725,12 @@ mxEllipse.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototy
 "jettyHeight",aa.prototype.jettyHeight));var b=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,
 c),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*a,3.5*a))];f>5*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));f>8*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,c));f>
 15*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return b};ja.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
 1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
 .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
 .25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
 .5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
-1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
 .75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
 1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
 [new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
@@ -2814,8 +2813,8 @@ DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({m
 DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(l){null!=b&&b(l)}}),b))};
 DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var l=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(l,this.ui.pages):null;var c=[this.ui.diffPages(null!=d?d:l,this.shadowPages)];if(!this.ignorePatches(c)){var f=this.ui.patchPages(l,
 c[0]);d={};var g=this.ui.getHashValueForPages(f,d),l={},p=this.ui.getHashValueForPages(this.shadowPages,l);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",p==g,g);if(null!=g&&g!=p){var m=this.compressReportData(this.getAnonymizedXmlForPages(q)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,c,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(l)+"\nFrom: "+v+"\nTo: "+t+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var u=this.getCurrentUser(),F=null!=u?u.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),F,D)}}catch(B){}}};
+"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(l)+"\nFrom: "+v+"\nTo: "+t+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(B){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(B);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,B);else{var u=this.getCurrentUser(),F=null!=u?u.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),F,B)}}catch(C){}}};
 DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
 DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
 DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var l=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
@@ -2946,8 +2945,8 @@ mxUtils.bind(this,function(c){this.cachedFonts[a]=c;d--;e()}),mxUtils.bind(this,
 function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&a[0].appendChild(c[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a,c){c=null!=c?c:this.fontCss;if(null!=c){var b=a.getElementsByTagName("defs"),f=a.ownerDocument;0==b.length?(b=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(b,
 a.firstChild):a.appendChild(b)):b=b[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,c);b.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,f,d,e,g,m,p,n,u,t,l,k,v){try{e=null!=e?e:!0;g=null!=g?g:!0;t=null!=t?t:this.graph;l=null!=l?l:0;var y=p?null:t.background;y==mxConstants.NONE&&
 (y=null);null==y&&(y=f);null==y&&0==p&&(y="#ffffff");this.convertImages(t.getSvg(null,null,null,k,null,g,null,null,null,n),mxUtils.bind(this,function(b){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){k.drawImage(f,l/m,l/m);a(p)},0):(k.drawImage(f,l/m,l/m),a(p))},p=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),u=parseInt(b.getAttribute("height"));m=null!=m?m:1;null!=c&&(m=e?Math.min(1,Math.min(3*c/(4*
-u),c/n)):c/n);n=Math.ceil(m*n)+2*l;u=Math.ceil(m*u)+2*l;p.setAttribute("width",n);p.setAttribute("height",u);var k=p.getContext("2d");null!=y&&(k.beginPath(),k.rect(0,0,n,u),k.fillStyle=y,k.fill());k.scale(m,m);if(v){var z=t.view,x=z.scale;z.scale=1;var q=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=x;var q="data:image/svg+xml;base64,"+q,D=t.gridSize*z.gridSteps*m,F=t.getGraphBounds(),K=z.translate.x*x,H=z.translate.y*x,B=K+(F.x-K)/x,A=H+(F.y-H)/x,E=new Image;E.onload=
-function(){try{for(var a=-Math.round(D-mxUtils.mod((K-B)*m,D)),c=-Math.round(D-mxUtils.mod((H-A)*m,D));a<n;a+=D)for(var b=c;b<u;b+=D)k.drawImage(E,a/m,b/m);g()}catch(ta){null!=d&&d(ta)}};E.onerror=function(a){null!=d&&d(a)};E.src=q}else g()}catch(ua){null!=d&&d(ua)}});f.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(ba){null!=
+u),c/n)):c/n);n=Math.ceil(m*n)+2*l;u=Math.ceil(m*u)+2*l;p.setAttribute("width",n);p.setAttribute("height",u);var k=p.getContext("2d");null!=y&&(k.beginPath(),k.rect(0,0,n,u),k.fillStyle=y,k.fill());k.scale(m,m);if(v){var z=t.view,x=z.scale;z.scale=1;var q=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=x;var q="data:image/svg+xml;base64,"+q,B=t.gridSize*z.gridSteps*m,F=t.getGraphBounds(),K=z.translate.x*x,H=z.translate.y*x,A=K+(F.x-K)/x,C=H+(F.y-H)/x,E=new Image;E.onload=
+function(){try{for(var a=-Math.round(B-mxUtils.mod((K-A)*m,B)),c=-Math.round(B-mxUtils.mod((H-C)*m,B));a<n;a+=B)for(var b=c;b<u;b+=B)k.drawImage(E,a/m,b/m);g()}catch(ta){null!=d&&d(ta)}};E.onerror=function(a){null!=d&&d(a)};E.src=q}else g()}catch(ua){null!=d&&d(ua)}});f.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(ba){null!=
 d&&d(ba)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(g)}catch(O){null!=d&&d(O)}}))}catch(ba){null!=d&&d(ba)}}),b,u)}catch(U){null!=d&&d(U)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var l=k,q=0;8>q;q++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[k]=l;Editor.updateCRC=function(a,c,b,f){for(var d=0;d<f;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^
 a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=p;p+=c;return a.substring(b,p)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function m(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 p=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,
 4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,p);do{var n=g(a);if("IDAT"==e(a,4)){d=a.substring(0,p-8);"pHYs"==c&&"dpi"==b?(b=Math.round(f/.0254),b=m(b)+m(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,c,0,4);f=Editor.updateCRC(f,b,0,b.length);d+=m(b.length)+c+b+m(f^4294967295);d+=a.substring(p-8,a.length);break}d+=a.substring(p-8,p-4+n);e(a,n);e(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?
@@ -2994,8 +2993,8 @@ function(){var a=mxUtils.htmlEntities(e.value);f(c,a,n)});e.focus();mxEvent.addL
 a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==k?parseInt(a):a)+"");f(c,a,n)}var g=document.createElement("input");d(y,g,!0);g.value=b;g.className="gePropEditor";"int"!=k&&"float"!=k||n.allowAuto||(g.type="number",g.step="int"==k?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)),null!=n.max&&(g.max=parseFloat(n.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",
 function(){e()})})));n.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(u,function(a){f(c,"",n,n.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",y.appendChild(l));z.appendChild(y);return z}var u=this,t=this.editorUi.editor.graph,l=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";k.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";
 var z=document.createElement("th");z.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;z.appendChild(y);mxUtils.write(z,mxResources.get("property"));v.style.cursor="pointer";var x=function(){var c=k.querySelectorAll(".gePropNonHeaderRow"),b;if(u.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(qa){}}else y.src=
-Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;x()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");v.appendChild(z);k.appendChild(v);var q=!1,D=!1,F;for(F in c)if(v=c[F],"function"!=typeof v.isVisible||v.isVisible(b,this)){var B=null!=b.style[F]?mxUtils.htmlEntities(b.style[F]+""):null!=v.getDefaultValue?
-v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)D=!D;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var A=v.dependentProps,E=[],K=[],z=0;z<A.length;z++){var C=b.style[A[z]];K.push(c[A[z]].subDefVal);E.push(null!=C?C.split(","):[])}v.dependentPropsDefVal=K;v.dependentPropsVals=E}k.appendChild(n(F,B,v,q,D));q=!q}}for(z=0;z<l.length;z++)for(v=l[z],c=v.parentRow,b=0;b<v.values.length;b++)F=n(v.name,v.values[b],
+Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;x()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");v.appendChild(z);k.appendChild(v);var q=!1,B=!1,F;for(F in c)if(v=c[F],"function"!=typeof v.isVisible||v.isVisible(b,this)){var A=null!=b.style[F]?mxUtils.htmlEntities(b.style[F]+""):null!=v.getDefaultValue?
+v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)B=!B;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var C=v.dependentProps,E=[],K=[],z=0;z<C.length;z++){var D=b.style[C[z]];K.push(c[C[z]].subDefVal);E.push(null!=D?D.split(","):[])}v.dependentPropsDefVal=K;v.dependentPropsVals=E}k.appendChild(n(F,A,v,q,B));q=!q}}for(z=0;z<l.length;z++)for(v=l[z],c=v.parentRow,b=0;b<v.values.length;b++)F=n(v.name,v.values[b],
 {type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(F,c.nextSibling),c=F;a.appendChild(k);x();return a};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 d=f.getModel().getStyle(b[c]),g=0;g<e.length;g++)d=mxUtils.removeStylename(d,
 e[g]);var m=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(m,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(m,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,
 a.stroke||mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(m,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(m,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(m,
@@ -3014,10 +3013,10 @@ a.button,c.relatedTarget=a.relatedTarget}catch(H){}}u.apply(this,arguments);wind
 this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
 c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||
 0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=
-Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(z){null!=window.console&&console.log("Error in vars URL parameter: "+z)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=
-D.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var B=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,m,p,n,u){var t=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
-(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var l=B.apply(this,arguments);if(u&&null!=this.extFonts&&0<this.extFonts.length){var v=l.ownerDocument,k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?k.setAttributeNS("type","text/css"):k.setAttribute("type","text/css");for(var z="",y="",x=0;x<this.extFonts.length;x++){var q=this.extFonts[x].name,D=this.extFonts[x].url;0==D.indexOf(Editor.GOOGLE_FONTS)?
-z+="@import url("+D+");\n":y+='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+D+'");\n}\n'}k.appendChild(v.createTextNode(z+y));l.getElementsByTagName("defs")[0].appendChild(k)}null!=t&&(this.stylesheet=t,this.refresh());return l};var A=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=A.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
+Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(z){null!=window.console&&console.log("Error in vars URL parameter: "+z)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var B=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=
+B.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,m,p,n,u){var t=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
+(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var l=C.apply(this,arguments);if(u&&null!=this.extFonts&&0<this.extFonts.length){var v=l.ownerDocument,k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?k.setAttributeNS("type","text/css"):k.setAttribute("type","text/css");for(var z="",y="",x=0;x<this.extFonts.length;x++){var q=this.extFonts[x].name,B=this.extFonts[x].url;0==B.indexOf(Editor.GOOGLE_FONTS)?
+z+="@import url("+B+");\n":y+='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+B+'");\n}\n'}k.appendChild(v.createTextNode(z+y));l.getElementsByTagName("defs")[0].appendChild(k)}null!=t&&(this.stylesheet=t,this.refresh());return l};var A=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=A.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
 (mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=a.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var d=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=f.innerHTML&&(d=a.text.value,a.text.value=f.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var x=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
 function(){x.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&
 this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var E=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){E.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==
@@ -3045,7 +3044,7 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo
 [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
 [SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var 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 G=mxMarker.createMarker;mxMarker.createMarker=
 function(a,c,b,f,d,e,g,m,p,n){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);null!=u&&mxStencilRegistry.getStencil(u)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1,Math.min(m,Math.max(parseInt(v.value),parseInt(l.value))));l.value=Math.max(1,Math.min(m,Math.min(parseInt(v.value),parseInt(l.value))))}function f(c){function b(c,b,e){var g=c.useCssTransforms,m=c.currentTranslate,p=c.currentScale,n=c.view.translate,u=
-c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),l=0,k=0,v=pa.get(),x=1/c.pageScale,z=D.checked;if(z)var x=parseInt(K.value),F=parseInt(na.value),x=Math.min(v.height*F/(t.height/c.view.scale),v.width*x/(t.width/c.view.scale));else x=parseInt(q.value)/(100*c.pageScale),isNaN(x)&&(f=1/c.pageScale,q.value="100 %");v=mxRectangle.fromRectangle(v);v.width=Math.ceil(v.width*
+c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),l=0,k=0,v=pa.get(),x=1/c.pageScale,z=B.checked;if(z)var x=parseInt(K.value),F=parseInt(na.value),x=Math.min(v.height*F/(t.height/c.view.scale),v.width*x/(t.width/c.view.scale));else x=parseInt(q.value)/(100*c.pageScale),isNaN(x)&&(f=1/c.pageScale,q.value="100 %");v=mxRectangle.fromRectangle(v);v.width=Math.ceil(v.width*
 f);v.height=Math.ceil(v.height*f);x*=f;!z&&c.pageVisible?(t=c.getPageLayout(),l-=t.x*v.width,k-=t.y*v.height):z=!0;if(null==b){b=PrintDialog.createPrintPreview(c,x,v,0,l,k,z);b.pageSelector=!1;b.mathEnabled=!1;l=a.getCurrentFile();null!=l&&(b.title=l.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d=
 c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var A=b.renderPage;b.renderPage=function(c,b,f,d,e,g){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
 var p=A.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:p.className="geDisableMathJax";return p}}l=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(l=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=l&&(d.stylesheet=l,d.refresh())}else{v=c.background;if(null==v||""==v||v==mxConstants.NONE)v="#ffffff";b.backgroundColor=v;b.autoOrigin=z;b.appendGraph(c,x,l,k,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e=
@@ -3058,14 +3057,14 @@ n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.write
 document.createElement("div");n.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");n.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));n.appendChild(g);mxUtils.br(n);var t=u.cloneNode(!0);u.setAttribute("checked","checked");
 t.setAttribute("value","range");n.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.style.width="50px";n.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var v=l.cloneNode(!0);n.appendChild(v);mxEvent.addListener(l,"focus",
 function(){t.checked=!0});mxEvent.addListener(v,"focus",function(){t.checked=!0});mxEvent.addListener(l,"change",b);mxEvent.addListener(v,"change",b);if(null!=a.pages&&(m=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){p=g+1;l.value=p;v.value=p;break}l.setAttribute("max",m);v.setAttribute("max",m);1<m&&e.appendChild(n);var k=document.createElement("div");k.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value",
-"adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");k.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));k.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";k.appendChild(q);mxEvent.addListener(q,"focus",function(){x.checked=!0});e.appendChild(k);var n=n.cloneNode(!1),D=x.cloneNode(!0);D.setAttribute("value","fit");x.setAttribute("checked",
-"checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(D);n.appendChild(g);k=document.createElement("table");k.style.display="inline-block";var F=document.createElement("tbody"),y=document.createElement("tr"),B=y.cloneNode(!0),A=document.createElement("td"),E=A.cloneNode(!0),C=A.cloneNode(!0),G=A.cloneNode(!0),I=A.cloneNode(!0),J=A.cloneNode(!0);A.style.textAlign="right";G.style.textAlign="right";mxUtils.write(A,
-mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));C.appendChild(g);mxUtils.write(G,mxResources.get("fitToBy"));var na=K.cloneNode(!0);I.appendChild(na);mxEvent.addListener(K,"focus",function(){D.checked=!0});mxEvent.addListener(na,"focus",
-function(){D.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));J.appendChild(g);y.appendChild(A);y.appendChild(E);y.appendChild(C);B.appendChild(G);B.appendChild(I);B.appendChild(J);F.appendChild(y);F.appendChild(B);k.appendChild(F);n.appendChild(k);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);g=document.createElement("div");
+"adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");k.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));k.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";k.appendChild(q);mxEvent.addListener(q,"focus",function(){x.checked=!0});e.appendChild(k);var n=n.cloneNode(!1),B=x.cloneNode(!0);B.setAttribute("value","fit");x.setAttribute("checked",
+"checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(B);n.appendChild(g);k=document.createElement("table");k.style.display="inline-block";var F=document.createElement("tbody"),y=document.createElement("tr"),C=y.cloneNode(!0),A=document.createElement("td"),E=A.cloneNode(!0),D=A.cloneNode(!0),G=A.cloneNode(!0),I=A.cloneNode(!0),J=A.cloneNode(!0);A.style.textAlign="right";G.style.textAlign="right";mxUtils.write(A,
+mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));D.appendChild(g);mxUtils.write(G,mxResources.get("fitToBy"));var na=K.cloneNode(!0);I.appendChild(na);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(na,"focus",
+function(){B.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));J.appendChild(g);y.appendChild(A);y.appendChild(E);y.appendChild(D);C.appendChild(G);C.appendChild(I);C.appendChild(J);F.appendChild(y);F.appendChild(C);k.appendChild(F);n.appendChild(k);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);g=document.createElement("div");
 g.style.marginBottom="12px";var pa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";n.appendChild(ka);e.appendChild(n);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";
 n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),k.className="geBtn",g.appendChild(k));PrintDialog.previewEnabled&&(k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),k.className="geBtn",g.appendChild(k));k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
-"print":"ok"),function(){a.hideDialog();f(!0)});k.className="geBtn gePrimaryBtn";g.appendChild(k);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var C=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)):(C.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),
+"print":"ok"),function(){a.hideDialog();f(!0)});k.className="geBtn gePrimaryBtn";g.appendChild(k);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var D=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)):(D.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
 this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var J=document.createElement("canvas"),I=new Image;I.onload=function(){try{J.getContext("2d").drawImage(I,0,0);var a=J.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};I.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(y){}})();
 (function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
 "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
@@ -3083,148 +3082,149 @@ b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled
 function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/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(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
 "9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&
 (null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&null!=c.status.parentNode&&c.status.parentNode.removeChild(c.status);c.status=null};
-c.pause=function(){return function(){}};return c};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(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
-80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=
-a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),n=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(v){}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));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var 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 n=this.updatePageRoot(new DiagramPage(d[e]));null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,n,0==e?n: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,d,e,m,n,l,t,u,k,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;u=null!=u?u:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?
-c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(p);if(Graph.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}k?(g=g.cloneNode(!0),g.removeAttribute("modified"),
-g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",
-(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!m&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(n||
-!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b,e,null,t,u,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),
-a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=
-(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=
-d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",
-this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(n){a[EditorUi.DIFF_INSERT][c].data=n.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+
-"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=
-a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&&c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+
-"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?
-c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,m,n,l,
-t,u,k){m=null!=m?m:!0;n=null!=n?n:!1;var c=this.editor.graph;if(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))if(k=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}l=null!=l?l:this.getXmlFileData(m,n,k);u=null!=u?u:this.getCurrentFile();a=this.createFileData(l,
-c,u,window.location.href,a,b,d,e,m,t,k);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,m,n){n=null!=n?n:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+
-"/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=m&&(m=m.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+
-(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,m){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
-toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":
-"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=
-this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=
-a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var n=this.editor.graph.getModel(),l=n.getChildren(n.root),d=0;d<l.length;d++){var t=l[d];n.setVisible(t,a[t.id]||
-!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};
-EditorUi.prototype.downloadFile=function(a,b,d,e,m,n,l,t,u,k,q){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!m),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,m,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var d=this.createDownloadRequest(c,a,e,b,l,m,t,u,k,q);this.editor.graph.pageVisible=f;return d}catch(L){this.handleError(L)}}));else{var p=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var D=this.editor.graph.background;if(l||D==mxConstants.NONE)D=null;var F=this.editor.graph.getSvg(D,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",
-p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),e)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,m,n,l,t,u,k){var c=this.editor.graph,f=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==n?!1:"xmlpng"!=b);var g="",p="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};k=k?"1":"0";"pdf"==b&&0==n&&(p="&allPages=1");if("xmlpng"==b&&(k="1",b="png",null!=
-this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=c.background;"png"==b&&m?n=mxConstants.NONE:m||null!=n&&n!=mxConstants.NONE||(n="#ffffff");m={globalVars:c.getExportVariables()};u&&(m.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+p+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+k+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):
-"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=l?"&scale="+l:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
-f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,m=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?
-(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(m,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();m()}));n();m()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.editor.loadUrl(e,
-mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var l=
-null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=n.getCell(a.getAttribute("id"));if(null!=t){try{var u=a.getAttribute("value");if(null!=u){var k=mxUtils.parseXml(u).documentElement;if(null!=k)if("1"==k.getAttribute("replace-value"))n.setValue(t,k);else for(var q=k.attributes,B=0;B<q.length;B++)e.setAttributeForCell(t,q[B].nodeName,0<q[B].nodeValue.length?q[B].nodeValue:null)}}catch(y){null!=window.console&&console.log("Error in value for "+t.id+": "+y)}try{var A=a.getAttribute("style");
-null!=A&&e.model.setStyle(t,A)}catch(y){null!=window.console&&console.log("Error in style for "+t.id+": "+y)}try{var x=a.getAttribute("icon");if(null!=x){var E=0<x.length?JSON.parse(x):null;null!=E&&E.append||e.removeCellOverlays(t);null!=E&&e.addCellOverlay(t,c(E))}}catch(y){null!=window.console&&console.log("Error in icon for "+t.id+": "+y)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),C=e.getCellGeometry(t);if(null!=C){C=C.clone();for(key in G){var J=parseFloat(G[key]);"dx"==
-key?C.x+=J:"dy"==key?C.y+=J:"dw"==key?C.width+=J:"dh"==key?C.height+=J:C[key]=parseFloat(G[key])}e.model.setGeometry(t,C)}}}catch(y){null!=window.console&&console.log("Error in icon for "+t.id+": "+y)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=
-new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!=l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),
-l=e.getMonth()+1,t=e.getDate(),u=e.getHours(),k=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+l+"-"+t+"-"+u+"-"+k+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,
-function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&
-"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&
-a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=
-v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(t){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(v,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=
-function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var l=a[e].node.cloneNode(!1);l.removeAttribute("name");f.root=a[e].root;var t=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,t,!0);t.removeAttribute("pageWidth");t.removeAttribute("pageHeight");l.appendChild(t);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+=l.getElementsByTagName("mxCell").length);
-c=(c<<5)-c+this.hashValue(l,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=
-a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=
-function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,m,n,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
-EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];
-if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=
-mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=
-a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),
-d,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var u=p.parentNode.previousSibling;e=u.getAttribute("title");null!=e&&0<e.length&&".scratchpad"!=a.title&&u.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");u.style.position="relative";var k=document.createElement("img");
-k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("valign","absmiddle");k.setAttribute("border","0");k.style.cursor="pointer";k.style.margin="0 3px";var q=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),
-mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var A=this.editor.graph,x=null,E=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),p,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x),x=k.cloneNode(!1),x.setAttribute("src",Editor.spinImage),x.setAttribute("title",mxResources.get("saving")),x.style.cursor="default",x.style.marginRight="2px",
-x.style.marginTop="-2px",l.insertBefore(x,l.firstChild),u.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=x&&null!=x.parentNode&&(x.parentNode.removeChild(x),u.style.paddingRight=18*l.childNodes.length+"px")})):null==q&&(q=k.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),l.insertBefore(q,l.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(u.style.paddingRight=18*l.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(c)})),u.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,e){a=A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var m=A.getCellGeometry(a[g]);null!=m&&m.translate(-c.x,-c.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,
-c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=A.getSelectionCells(),
-b=A.view.getBounds(c),d=A.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=A.view.translate.x;b.y-=A.view.translate.y;C(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.first&&(A.graphHandler.suspend(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,mxEvent.consume(a))}),
-mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(p.style.backgroundColor="",p.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.first&&(A.graphHandler.resume(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor=
-"",p.style.cursor="",A.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,
-d,e,m,n,u,l,t,k){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,u),c)],c[0].vertex=!0,C(c,new mxRectangle(0,0,n,u),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,q=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==
-d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(e.documentElement));g(m,p);b=b.concat(m);G(a);this.spinner.stop();v=!0}catch(N){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var u=this.stringToCells(Editor.getDiagramNodeXml(n[m])),l=this.editor.graph.getBoundingBoxFromGeometry(u);
-C(u,new mxRectangle(0,0,l.width,l.height),a)}v=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=k&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(k,function(a){q(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,
-l)&&null!=k?this.parseFile(k,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",
-Editor.editImage);k.setAttribute("title",mxResources.get("edit"));l.insertBefore(k,l.firstChild);mxEvent.addListener(k,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==p&&E(a)});e=k.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));l.insertBefore(e,l.firstChild);mxEvent.addListener(e,"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",
-mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),l.insertBefore(e,l.firstChild))}u.appendChild(l);u.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=
-64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),
-Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&
-(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
-EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,m){a=new ImageDialog(this,a,b,d,e,m);this.showDialog(a.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,
-200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,m){a=new LibraryDialog(this,a,b,d,e,m);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));
-return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":
-"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,m,n,l){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+
-(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(x){}if(null!=f||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),p=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),p=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){l=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var k=null!=n?n:window.location.hash;if(null!=k&&("#G"==k.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==k.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){k="#U"==k.substring(0,2)?
-k.substring(45,k.lastIndexOf("%26ex")):k.substring(2);this.showError(b,l,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+k);this.handleError(a,b,d,e,m)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;f.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,
-function(){var b=f.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(f);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?
-l=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?l=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,l,g,d,p,null,null,n,v,null,null,null,
-e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,m,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,m,null,null,null,null,f);this.showDialog(a.container,340,46+
-f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");
-mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(c);c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",
-mxResources.get("close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(c);mxUtils.write(f,b);document.body.appendChild(f);this.bannerShowing=!0;var e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight=
-"6px";e.appendChild(g);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));e.appendChild(b);f.style.paddingBottom="30px";f.appendChild(e);var l=mxUtils.bind(this,function(c){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",
-mxUtils.bind(this,function(a){mxEvent.consume(a);l()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b&&(mxEvent.consume(a),d(),l())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){l(!0)}),1E3)}),3E4);c=!0}return c};
-EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));
-0<e&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,m){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d,m);this.saveData(e,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&
-!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,m){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b+=".drawio");if(window.Blob&&
-navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,e);else{var c=document.createElement("a"),f=(null==navigator.userAgent||
-0>navigator.userAgent.indexOf("PaleMoon/"))&&!mxClient.IS_IOS&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(u){}}else this.createEchoRequest(a,
-b,d,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,m,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=n?"&base64="+n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),l=0;l<f;++l){for(var t=1024*l,u=Math.min(t+1024,d),k=Array(u-t),q=0;t<u;++q,++t)k[q]=
-c[t].charCodeAt(0);e[l]=new Uint8Array(k)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,m,n,l){n=null!=n?n:!1;l=null!=l?l:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(n);isLocalStorage&&m++;var c=4>=m?2:6<m?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+
-mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(A){this.handleError(A)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,l,null,1<m,c,a,d,e);n=this.isServices(m)?m>c?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};
-EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;
-EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.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=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=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});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,
-null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.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",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,m){this.isLocalFileSave()?this.saveLocalFile(d,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,m,b,c)}),d,m,e)};EditorUi.prototype.saveRequest=function(a,
-b,d,e,m,n,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){n=null!=n?n:"pdf"==b?"application/pdf":"image/"+
-b;if(null!=e)try{this.exportFile(e,a,n,!0,c,d)}catch(x){this.handleError(x)}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,n,!0,c,d)}catch(x){this.handleError(x)}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,l,null,1<c,f,e,n,m);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,m,n){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,m,n,l,k,u,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=
-this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,l,k,null,d,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,u,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,t,this.thumbImageCache)):t(g)}catch(G){this.handleError(G)}};EditorUi.prototype.addRadiobox=
-function(a,b,d,e,m,n,l){return this.addCheckbox(a,d,e,m,n,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,m,n,l,k){n=null!=n?n:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=l;null!=k&&c.setAttribute("name",k);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");n&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,
-b),d.setAttribute("for",l),a.appendChild(d),m||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");
-d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,
-300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?
-"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");
-f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",l=
-null,l=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width="22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};
-EditorUi.prototype.createLink=function(a,b,d,e,m,n,l,k){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),n&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=l?d=
-"#U"+encodeURIComponent(l):(c=this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
-"https://"+window.location.host)+"/"+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,m,n,l,k,u,q,D){this.getBasenames();var c={};""!=m&&m!=mxConstants.NONE&&(c.highlight=m);"auto"!==e&&(c.target=e);u||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);
-k&&d.push("layers");0<d.length&&(u&&d.push("lightbox"),c.toolbar=d.join(" "));null!=q&&0<q.length&&(c.edit=q);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";D(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
-EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");
-g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","type-embedhtmldialog");f=p.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var u=document.createElement("span");mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(u);mxUtils.br(g);g.appendChild(p);
-u=document.createElement("span");mxUtils.write(u,mxResources.get("publicDiagramUrl"));g.appendChild(u);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(u=document.createElement("a"),u.style.paddingLeft="12px",u.style.color="gray",u.setAttribute("href","javascript:void(0);"),mxUtils.write(u,mxResources.get("share")),g.appendChild(u),mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked",
-"checked");null==d&&p.setAttribute("disabled","disabled");c.appendChild(g);var k=this.addLinkSection(c),q=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";c.appendChild(A);var x=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(c,mxResources.get("allPages"),
-g,!g),G=this.addCheckbox(c,mxResources.get("layers"),!0),C=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,C),I=J.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&C.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(p.checked?d:null,q.checked,
-A.value,k.getTarget(),k.getColor(),x.checked,E.checked,G.checked,C.checked,J.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,m,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";
-a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));p.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));
+c.pause=function(){return function(){}};return c};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(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
+80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
+EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,
+">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),n=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(v){}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));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
+function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var 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 n=this.updatePageRoot(new DiagramPage(d[e]));
+null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,n,0==e?n: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,d,e,m,n,l,t,u,k,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;u=null!=u?u:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
+Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(p);if(Graph.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}k?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),
+g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),
+a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!m&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(n||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b,
+e,null,t,u,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):
+(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
+f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(n){a[EditorUi.DIFF_INSERT][c].data=
+n.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
+delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=
+0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&&c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=
+c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),
+this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,m,n,l,t,u,k){m=null!=m?m:!0;n=null!=n?n:!1;var c=this.editor.graph;if(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))if(k=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}l=null!=l?l:this.getXmlFileData(m,n,k);u=null!=u?u:this.getCurrentFile();a=this.createFileData(l,c,u,window.location.href,a,b,d,e,m,t,k);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);
+return a};EditorUi.prototype.getHtml=function(a,b,d,e,m,n){n=null!=n?n:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=m&&(m=m.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,m){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==
+m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+
+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=Editor.extractParserError(a,
+mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",
+[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var n=this.editor.graph.getModel(),l=n.getChildren(n.root),d=0;d<l.length;d++){var t=l[d];n.setVisible(t,a[t.id]||!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||
+/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,m,n,l,t,u,k,q){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!m),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+
+this.getFileData(!0,null,null,null,e,m,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var d=this.createDownloadRequest(c,
+a,e,b,l,m,t,u,k,q);this.editor.graph.pageVisible=f;return d}catch(L){this.handleError(L)}}));else{var p=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var B=this.editor.graph.background;if(l||B==mxConstants.NONE)B=null;var F=this.editor.graph.getSvg(B,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(F);
+this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),e)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,m,n,l,t,u,k){var c=this.editor.graph,f=c.getGraphBounds();
+d=this.getFileData(!0,null,null,null,d,0==n?!1:"xmlpng"!=b);var g="",p="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};k=k?"1":"0";"pdf"==b&&0==n&&(p="&allPages=1");if("xmlpng"==b&&(k="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=c.background;"png"==b&&m?n=mxConstants.NONE:m||null!=n&&n!=mxConstants.NONE||(n="#ffffff");m={globalVars:c.getExportVariables()};
+u&&(m.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+p+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+k+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=l?"&scale="+l:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,
+f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?
+parseInt(a.interval):6E4,g=null,m=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(m,
+e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();m()}));n();m()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.editor.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,
+a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=n.getCell(a.getAttribute("id"));if(null!=t){try{var u=a.getAttribute("value");if(null!=u){var k=mxUtils.parseXml(u).documentElement;if(null!=k)if("1"==k.getAttribute("replace-value"))n.setValue(t,
+k);else for(var q=k.attributes,C=0;C<q.length;C++)e.setAttributeForCell(t,q[C].nodeName,0<q[C].nodeValue.length?q[C].nodeValue:null)}}catch(y){null!=window.console&&console.log("Error in value for "+t.id+": "+y)}try{var A=a.getAttribute("style");null!=A&&e.model.setStyle(t,A)}catch(y){null!=window.console&&console.log("Error in style for "+t.id+": "+y)}try{var x=a.getAttribute("icon");if(null!=x){var E=0<x.length?JSON.parse(x):null;null!=E&&E.append||e.removeCellOverlays(t);null!=E&&e.addCellOverlay(t,
+c(E))}}catch(y){null!=window.console&&console.log("Error in icon for "+t.id+": "+y)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),D=e.getCellGeometry(t);if(null!=D){D=D.clone();for(key in G){var J=parseFloat(G[key]);"dx"==key?D.x+=J:"dy"==key?D.y+=J:"dw"==key?D.width+=J:"dh"==key?D.height+=J:D[key]=parseFloat(G[key])}e.model.setGeometry(t,D)}}}catch(y){null!=window.console&&console.log("Error in icon for "+t.id+": "+y)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=
+I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!=
+l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),l=e.getMonth()+1,t=e.getDate(),u=e.getHours(),k=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+l+"-"+t+"-"+u+"-"+k+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c=
+this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&
+0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);
+a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||
+this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":
+"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+
+v.stack})}catch(t){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(v,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);
+var l=a[e].node.cloneNode(!1);l.removeAttribute("name");f.root=a[e].root;var t=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,t,!0);t.removeAttribute("pageWidth");t.removeAttribute("pageHeight");l.appendChild(t);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+=l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&
+"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,
+b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,m,n,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);
+return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;
+if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),
+b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?
+(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var u=p.parentNode.previousSibling;e=u.getAttribute("title");null!=e&&0<e.length&&".scratchpad"!=a.title&&u.setAttribute("title",
+this.getLibraryStorageHint(a)+"\n"+e);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");u.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("valign","absmiddle");k.setAttribute("border","0");k.style.cursor="pointer";k.style.margin=
+"0 3px";var q=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var A=this.editor.graph,x=null,E=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),p,
+b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x),x=k.cloneNode(!1),x.setAttribute("src",Editor.spinImage),x.setAttribute("title",mxResources.get("saving")),x.style.cursor="default",x.style.marginRight="2px",x.style.marginTop="-2px",l.insertBefore(x,l.firstChild),u.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=x&&null!=
+x.parentNode&&(x.parentNode.removeChild(x),u.style.paddingRight=18*l.childNodes.length+"px")})):null==q&&(q=k.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),l.insertBefore(q,l.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(u.style.paddingRight=18*l.childNodes.length+"px",q.parentNode.removeChild(q),
+q=null)});mxEvent.consume(c)})),u.style.paddingRight=18*l.childNodes.length+"px")}),D=mxUtils.bind(this,function(a,c,d,e){a=A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var m=A.getCellGeometry(a[g]);null!=m&&m.translate(-c.x,-c.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);G(d);null!=
+f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=A.getSelectionCells(),b=A.view.getBounds(c),d=A.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=A.view.translate.x;b.y-=A.view.translate.y;D(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,
+function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.first&&(A.graphHandler.suspend(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(p.style.backgroundColor="",p.style.cursor="default",this.sidebar.showTooltips=!0,
+A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.first&&(A.graphHandler.resume(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",A.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect=
+"copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,m,n,u,l,t,k){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",
+new mxGeometry(0,0,n,u),c)],c[0].vertex=!0,D(c,new mxRectangle(0,0,n,u),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,q=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(e.documentElement));
+g(m,p);b=b.concat(m);G(a);this.spinner.stop();v=!0}catch(N){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var u=this.stringToCells(Editor.getDiagramNodeXml(n[m])),l=this.editor.graph.getBoundingBoxFromGeometry(u);D(u,new mxRectangle(0,0,l.width,l.height),a)}v=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=k&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(k,function(a){q(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,l)&&null!=k?this.parseFile(k,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",Editor.editImage);k.setAttribute("title",mxResources.get("edit"));l.insertBefore(k,l.firstChild);mxEvent.addListener(k,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
+p&&E(a)});e=k.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));l.insertBefore(e,l.firstChild);mxEvent.addListener(e,"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),l.insertBefore(e,l.firstChild))}u.appendChild(l);u.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),
+0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
+"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
+"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
+Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,m){a=new ImageDialog(this,a,b,d,e,m);this.showDialog(a.container,Graph.fileSupport?
+480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,m){a=new LibraryDialog(this,a,b,d,e,m);this.showDialog(a.container,640,440,!0,!1,
+mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position=
+"absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
+mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,m,n,l){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(x){}if(null!=f||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));
+var g=mxResources.get("ok"),p=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),p=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){l=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var k=
+null!=n?n:window.location.hash;if(null!=k&&("#G"==k.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==k.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){k="#U"==k.substring(0,2)?k.substring(45,k.lastIndexOf("%26ex")):k.substring(2);this.showError(b,l,mxResources.get("openInNewWindow"),mxUtils.bind(this,
+function(){this.editor.graph.openLink("https://drive.google.com/open?id="+k);this.handleError(a,b,d,e,m)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option");
+mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;f.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var b=f.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||
+(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(f);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?l=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?l=mxUtils.htmlEntities(f.response.error):"undefined"!==
+typeof window.App&&(f.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,l,g,d,p,null,null,n,v,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,
+340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,m,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,m,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&
+null!=mxSettings.settings["close"+a])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";
+c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(c);c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+f.appendChild(c);mxUtils.write(f,b);document.body.appendChild(f);this.bannerShowing=!0;var e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";e.appendChild(g);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));e.appendChild(b);
+f.style.paddingBottom="30px";f.appendChild(e);var l=mxUtils.bind(this,function(c){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);l()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b&&(mxEvent.consume(a),
+d(),l())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){l(!0)}),1E3)}),3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,m){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,
+b,d,m);this.saveData(e,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width=
+"600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,m){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b+=".drawio");if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):
+(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,e);else{var c=document.createElement("a"),f=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&!mxClient.IS_IOS&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),
+f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(u){}}else this.createEchoRequest(a,b,d,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,m,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
+a+(null!=d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=n?"&base64="+n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),l=0;l<f;++l){for(var t=1024*l,u=Math.min(t+1024,d),k=Array(u-t),q=0;t<u;++q,++t)k[q]=c[t].charCodeAt(0);e[l]=new Uint8Array(k)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,m,n,l){n=null!=n?n:!1;l=null!=l?l:
+"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(n);isLocalStorage&&m++;var c=4>=m?2:6<m?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&
+this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(A){this.handleError(A)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,l,null,1<m,c,a,d,e);n=this.isServices(m)?m>c?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=
+b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.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=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+d.zIndex;var f=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});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";
+a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.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",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,m){this.isLocalFileSave()?this.saveLocalFile(d,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,m,b,c)}),d,m,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,m,n,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
+function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){n=null!=n?n:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,n,!0,c,d)}catch(x){this.handleError(x)}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,n,!0,c,d)}catch(x){this.handleError(x)}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,l,null,1<c,f,e,n,m);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
+a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,m,n){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,m,n,l,k,u,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,
+a,l,k,null,d,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,u,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?
+this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,t,this.thumbImageCache)):t(g)}catch(G){this.handleError(G)}};EditorUi.prototype.addRadiobox=function(a,b,d,e,m,n,l){return this.addCheckbox(a,d,e,m,n,l,!0,
+b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,m,n,l,k){n=null!=n?n:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=l;null!=k&&c.setAttribute("name",k);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");n&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",l),a.appendChild(d),m||mxUtils.br(a));
+return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));
+e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",
+mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+
+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value",
+"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",l=null,l=mxUtils.button("",
+mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width="22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=
+function(a,b,d,e,m,n,l,k){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),n&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=
+this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+
+"/"+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,m,n,l,k,u,q,B){this.getBasenames();var c={};""!=m&&m!=mxConstants.NONE&&(c.highlight=m);"auto"!==e&&(c.target=e);u||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);k&&d.push("layers");0<d.length&&
+(u&&d.push("lightbox"),c.toolbar=d.join(" "));null!=q&&0<q.length&&(c.edit=q);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";B(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+
+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";
+var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","type-embedhtmldialog");f=p.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var u=document.createElement("span");mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(u);mxUtils.br(g);g.appendChild(p);u=document.createElement("span");mxUtils.write(u,mxResources.get("publicDiagramUrl"));
+g.appendChild(u);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(u=document.createElement("a"),u.style.paddingLeft="12px",u.style.color="gray",u.setAttribute("href","javascript:void(0);"),mxUtils.write(u,mxResources.get("share")),g.appendChild(u),mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&p.setAttribute("disabled","disabled");c.appendChild(g);var k=
+this.addLinkSection(c),q=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";c.appendChild(A);var x=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(c,mxResources.get("allPages"),g,!g),G=this.addCheckbox(c,mxResources.get("layers"),!0),
+D=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,D),I=J.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&D.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(p.checked?d:null,q.checked,A.value,k.getTarget(),k.getColor(),x.checked,E.checked,
+G.checked,D.checked,J.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,m,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=
+g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));p.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));
 l.style.marginTop="12px";l.className="geBtn";p.appendChild(l);c.appendChild(p);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));p.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,
 null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var k=null,q=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),k=document.createElement("input"),k.setAttribute("type","text"),k.style.marginRight="16px",k.style.width="50px",k.style.marginLeft="6px",k.style.marginRight="16px",k.style.marginBottom="10px",k.value="100%",c.appendChild(k),mxUtils.write(c,mxResources.get("height")+
-":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var x=this.addLinkSection(c,n);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==g||g.constructor!=window.DriveFile||b)E=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(c,mxResources.get("lightbox"),!0),C=this.addEditButton(c,G),J=C.getEditInput(),I=this.addCheckbox(c,mxResources.get("layers"),
-!0);I.style.marginLeft=J.style.marginLeft;I.style.marginBottom="16px";I.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(I.removeAttribute("disabled"),J.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&G.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){m(x.getTarget(),x.getColor(),null==E?
-!0:E.checked,G.checked,C.getLink(),I.checked,null!=k?k.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=k?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var x=this.addLinkSection(c,n);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==g||g.constructor!=window.DriveFile||b)E=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(c,mxResources.get("lightbox"),!0),D=this.addEditButton(c,G),J=D.getEditInput(),I=this.addCheckbox(c,mxResources.get("layers"),
+!0);I.style.marginLeft=J.style.marginLeft;I.style.marginBottom="16px";I.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(I.removeAttribute("disabled"),J.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&G.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){m(x.getTarget(),x.getColor(),null==E?
+!0:E.checked,G.checked,D.getLink(),I.checked,null!=k?k.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=k?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
 mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";c.appendChild(f);if(m){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type",
 "text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c)}var l=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,q=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=q&&(q.style.marginBottom="16px");a=
 new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(p.value)||0;d(!l.checked,null!=k?k.checked:!1,null!=q?q.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(m?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,m,n,l,k){l=null!=l?l:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==k?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
 c.appendChild(p);mxUtils.write(c,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";c.appendChild(t);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||
-"0";c.appendChild(q);mxUtils.br(c);var v=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=k),G=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.style.marginLeft="24px";C.setAttribute("disabled","disabled");C.setAttribute("type","checkbox");n&&(c.appendChild(C),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(G,"change",function(){G.checked?
-C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(C.setAttribute("checked","checked"),C.defaultChecked=!0);var J=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||I.setAttribute("disabled","disabled");b&&(c.appendChild(I),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=
+"0";c.appendChild(q);mxUtils.br(c);var v=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=k),G=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.style.marginLeft="24px";D.setAttribute("disabled","disabled");D.setAttribute("type","checkbox");n&&(c.appendChild(D),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(G,"change",function(){G.checked?
+D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(D.setAttribute("checked","checked"),D.defaultChecked=!0);var J=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||I.setAttribute("disabled","disabled");b&&(c.appendChild(I),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=
 26);var y=null;if("png"==k||"jpeg"==k)y=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var K=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=k),z=null!=this.pages&&1<this.pages.length,L=this.addCheckbox(c,z?mxResources.get("allPages"):"",z,!z,null,"jpeg"!=k);L.style.marginLeft="24px";L.style.marginBottom="16px";z?g+=26:L.style.display="none";mxEvent.addListener(K,"change",function(){K.checked&&z?L.removeAttribute("disabled"):
 L.setAttribute("disabled","disabled")});l&&z||L.setAttribute("disabled","disabled");var P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="8px";P.style.marginRight="10px";P.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));P.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));P.appendChild(a);"svg"==k&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(P),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;m(t.value,v.checked,!G.checked,J.checked,K.checked,I.checked,q.value,C.checked,!L.checked,P.value,null!=y?y.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null,
+a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));P.appendChild(a);"svg"==k&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(P),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;m(t.value,v.checked,!G.checked,J.checked,K.checked,I.checked,q.value,D.checked,!L.checked,P.value,null!=y?y.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null,
 null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var p=this.addCheckbox(c,mxResources.get("fit"),
 !0),l=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),k=this.addCheckbox(c,d),q=this.addCheckbox(c,mxResources.get("lightbox"),!0),A=this.addEditButton(c,q),x=A.getEditInput(),E=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(c,mxResources.get("layers"),E,!E);G.style.marginLeft=x.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&G.removeAttribute("disabled"),x.removeAttribute("disabled")):
 (G.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"));x.checked&&q.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(p.checked,l.checked,k.checked,q.checked,A.getLink(),G.checked)}),null,mxResources.get("embed"),m);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,m,n,l,k){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
@@ -3237,216 +3237,216 @@ a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years")
 a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(n){}finally{this.editor.graph=d}return a};EditorUi.prototype.getPngFileProperties=function(a){var c=1,b=0;if(null!=a){if(a.hasAttribute("scale")){var d=
 parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,e,m){try{var c=this.editor.graph,f=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
 !0),c),g=d;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),p=c.getGlobalVariable,l=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:p.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(l.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
-"tEXt","mxfile",encodeURIComponent(g));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(A){null!=b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,c.shadowVisible,null,c,m)}catch(D){null!=b&&b(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,m,n,l,k){k=null!=k?k:!0;l=b.background;l==mxConstants.NONE&&(l=null);n=b.getSvg(l,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&
+"tEXt","mxfile",encodeURIComponent(g));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(A){null!=b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,c.shadowVisible,null,c,m)}catch(B){null!=b&&b(B)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,m,n,l,k){k=null!=k?k:!0;l=b.background;l==mxConstants.NONE&&(l=null);n=b.getSvg(l,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&
 n.setAttribute("content",a);null!=d&&n.setAttribute("resource",d);if(null!=m)this.embedFonts(n,mxUtils.bind(this,function(a){k?this.editor.convertImages(a,mxUtils.bind(this,function(a){m((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):m((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
 mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(p){b(a)}}))}catch(g){b(a)}}))};
-EditorUi.prototype.exportImage=function(a,b,d,e,m,n,l,k,u,q,D){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,m?this.getFileData(!0,null,null,null,d,k):null,u,null==this.pages||0==this.pages.length,D)}catch(x){"Invalid image"==x.message?this.downloadFile(u):
+EditorUi.prototype.exportImage=function(a,b,d,e,m,n,l,k,u,q,B){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,m?this.getFileData(!0,null,null,null,d,k):null,u,null==this.pages||0==this.pages.length,B)}catch(x){"Invalid image"==x.message?this.downloadFile(u):
 this.handleError(x)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,n,l,q)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,e,m){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var l=
 this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var p=l.getElementsByTagName("diagram");if(1==p.length)l=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],k=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),l=Editor.parseDiagramNode(p[0]),e=!1,k=1);for(;k<p.length;k++){var q=p[k].getAttribute("id");
 p[k].removeAttribute("id");var A=this.updatePageRoot(new DiagramPage(p[k]));a[q]=p[k].getAttribute("id");var x=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));f.model.execute(new ChangePage(this,A,A,x,!0));g.push(A)}this.updatePageLinks(a,g)}}if(null!=l&&"mxGraphModel"===l.nodeName&&(c=f.importGraphModel(l,b,d,e),null!=c))for(k=0;k<c.length;k++)this.updatePageLinksForCell(a,c[k])}finally{f.model.endUpdate()}}}catch(E){if(m)throw E;this.handleError(E)}return c};
 EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),l=!1,k=0;k<e.length;k++)f=e[k].getAttribute("href"),null!=f&&(e[k].setAttribute("href",this.updatePageLink(a,f)),
 l=!0);l&&d.labelChanged(b,c.innerHTML)}for(k=0;k<d.model.getChildCount(b);k++)this.updatePageLinksForCell(a,d.model.getChildAt(b,k))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0,
 13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(v){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);
-try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");0<=g&&g<e.length&&(f=e.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(F){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,e);var m=new XMLHttpRequest;m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);
-m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(A){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(B){d(B)}else d({})});m.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(F){d(F)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(m){d(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||
-this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||
-this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(m){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(m){null!=window.console&&console.error(m),d(m)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+
-(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));d(c.convertDataUri(Editor.createSvgDataUri(a)),f,g)}else e({message:mxResources.get("invalidInput")})}catch(D){e(D)}})}catch(v){e(v)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+
-a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);
-else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=c.result,m=g.indexOf(","),l=decodeURIComponent(escape(atob(g.substring(m+1)))),n=mxUtils.parseXml(l).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}d(c.result,a,f)}catch(J){e(J)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};
-g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,m,l,k){l=null!=l?l:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,l,!0)}if("data:image/png;base64,"==
-a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,d,l,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f,b,d,l,!0);if(0<g.length)return g}catch(B){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,
-a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,
-function(c){this.editor.graph.setSelectionCells(this.importXml(c,b,d,l));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),mxUtils.bind(this,function(){var c=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(c.container,610,360,!0,!1);c.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));
-else{c=this.editor.graph;m=null;c.getModel().beginUpdate();try{m=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");m.value=a;c.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var n=c.getPreferredSizeForCell(m,
-this.maxTextWidth);m.geometry.width=n.width;m.geometry.height=n.height}Graph.isLink(m.value)&&c.setLinkForCell(m,m.value);m.geometry.width+=c.gridSize;m.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=
-a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type",
-"file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,
-arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,m=!1;f.forEach(function(a,c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(m=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&
-(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):m||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
-f))};EditorUi.prototype.importFile=function(a,b,d,e,m,l,k,t,u,q,D){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):c=this.importXml(a,d,e,q);null!=t&&t(c)});"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=D?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),u=!0)),u||(b=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",
-D+1))),q&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,m,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=u&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(c=!0,this.importVisio(u,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(c=!0,this.parseFile(null!=
-u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=t&&t(null))}),k)):0==a.indexOf("PK")&&null!=u?(c=!0,this.importZipFile(u,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==t||t(f);return f};EditorUi.prototype.importFiles=
-function(a,b,d,e,m,l,k,t,u,q,D,B){e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=D||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,n=g.gridSize;m=null!=m?m:mxUtils.bind(this,function(a,b,d,f,e,g,m,l,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),
-this.loadLibrary(new LocalLibrary(this,a,m)),null):this.importFile(a,b,d,f,e,g,m,l,n,c,B)}catch(V){return this.handleError(V),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,u=p,v=[],x=mxUtils.bind(this,function(a,c){v[a]=c;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}l(b)}}),
-E=0;E<p;E++)mxUtils.bind(this,function(c){var l=a[c];if(null!=l){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var p=a.target.result,u=p.indexOf(","),t=decodeURIComponent(escape(atob(p.substring(u+1)))),z=mxUtils.parseXml(t),t=z.getElementsByTagName("svg");if(0<t.length){var t=t[0],v=B?null:t.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,
-!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var f=a[0],k=f.getAttribute("width"),t=f.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox",
-"0 0 "+k+" "+t);else if(isNaN(k)||isNaN(t)){var v=q.split(" ");3<v.length&&(k=parseFloat(v[2]),t=parseFloat(v[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,k)),e/Math.max(1,t)),E=m(p,l.type,b+c*n,d+c*n,Math.max(1,Math.round(k*x)),Math.max(1,Math.round(t*x)),l.name);if(isNaN(k)||isNaN(t)){var y=new Image;y.onload=mxUtils.bind(this,function(){k=Math.max(1,y.width);t=Math.max(1,y.height);E[0].geometry.width=k;E[0].geometry.height=t;f.setAttribute("viewBox",
-"0 0 "+k+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));g.setCellStyles("image",p,[E[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return E}}}catch(W){}return null})):x(c,mxUtils.bind(this,function(){return m(v,"text/xml",b+c*n,d+c*n,0,0,l.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==l.type){var E=B?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&
-0<E.length){var y=new Image;y.src=a.target.result;x(c,mxUtils.bind(this,function(){return m(E,"text/xml",b+c*n,d+c*n,y.width,y.height,l.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,
-a.target.result,mxUtils.bind(this,function(g,k,p){x(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var u=f&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(e/k,e/p)):1;return m(g,l.type,b+c*n,d+c*n,Math.round(k*u),Math.round(p*u),l.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,m(p,l.type,b+c*n,d+c*n,240,160,l.name,
-function(a){x(c,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?m(null,l.type,b+c*n,d+c*n,240,160,l.name,function(a){x(c,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?p.readAsDataURL(l):p.readAsText(l)}})(E)});if(g){g=[];for(p=0;p<a.length;p++)g.push(a[p]);a=g;this.confirmImageResize(function(a){f=a;v()},u)}else v()};EditorUi.prototype.confirmImageResize=function(a,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);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=function(a,
-b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,m,l){m=null!=m?m:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/m,f/m);if(1<g){var k=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas");p.width=k;p.height=n;p.getContext("2d").drawImage(a,0,0,k,n);var q=p.toDataURL();if(q.length<b.length){var x=document.createElement("canvas");x.width=k;x.height=n;var E=
-x.toDataURL();q!==E&&(b=q,c=k,f=n)}}}catch(G){}d(b,c,f)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d);c.src=a}catch(m){if(null!=d)d(m);else throw m;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
-!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("plantUml")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,e.format,function(f,g,m){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==e.format)b.labelChanged(c,"<pre>"+f+"</pre>"),
-b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=g,l.height=m,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:e.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("mermaid")+
-":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,e.config,function(f,g,m){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",f,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,g),l.height=Math.max(l.height,m),b.cellsResized([c],[l],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,config:e.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},
-null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var e=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,b){try{var d=this.graph.getAttributeForCell(c,"plantUmlData");null!=d?this.editPlantUmlData(c,b,d):(d=this.graph.getAttributeForCell(c,"mermaidData"),null!=d?this.editMermaidData(c,b,d):e.apply(this,arguments))}catch(G){a.handleError(G)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(E){a.handleError(E)}return b};
-var l=this.clearDefaultStyle;this.clearDefaultStyle=function(){l.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var m=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!=a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&
-(c+=(0<c.length?"&":"?")+"dev=1&drawdev=1");return m.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};k.call(this,a,c,d)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,
-null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var q=b.getExportVariables;b.getExportVariables=function(){var c=q.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,
-a.currentPage)+1:1;return c};var t=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:t.apply(this,arguments)};var u=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&
-mxEvent.isPopupTrigger(d))u.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};var F=this.actions.get("print");F.setEnabled(!mxClient.IS_IOS||!navigator.standalone);F.visible=F.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
-!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/
-2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=this.editor.graph,b=c.cellEditor.text2,d=null;null!=b&&(mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&
-(d=this.highlightElement(b));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,b,d,f,e,g){c.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var b=
-a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)?this.loadImage(decodeURIComponent(b),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));c.insertImage(decodeURIComponent(b),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(F=this.editor.graph.view,F.setUnit(mxSettings.getUnit()),F.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,F.unit),this.refresh());if("1"==urlParams.styledev){F=document.getElementById("geFooter");null!=F&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",
-mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),F.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));
-var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}F=document.getElementById("geInfo");null!=F&&F.parentNode.removeChild(F);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,
-function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&
-(g=e=null),this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=e=0);var m=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),
-c=document.createElement("div");c.innerHTML=l;var k=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(k=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?l=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,g,!0,k,null,n))});k&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=
-a;p()},mxEvent.isControlDown(a)):p()}else null!=m&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)?this.loadImage(decodeURIComponent(m),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+m+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(m,
-e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||
-c.originalEvent.clipboardData,d=!1,f=0;f<b.types.length;f++)if("text/"===b.types[f].substring(0,5)){d=!0;break}if(!d){var e=b.items;for(index in e){var l=e[index];if("file"===l.kind){if(a.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(c,b,d,f,e,g){a.insertImage(c,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],k.x,k.y,this.maxImageSize);
-mxEvent.consume(c)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak=
-"break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);
-mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",
-!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),
-a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,
-!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:m.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=
-function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();
-if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("customFonts");this.menus.customFonts=
-c;mxSettings.setCustomFonts(c);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);
-mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&
-this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),
-f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d,e){if(!mxEvent.isConsumed(a)){var c=b,f=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){c=document.createElement("div");c.innerHTML=g;f=!0;g=c.getElementsByTagName("style");
-if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(g=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,g==c.firstChild.nextSibling.getAttribute("href")&&
-(mxUtils.setTextContent(c,g),f=!1));Graph.removePasteFormatting(c)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,g))}g=c.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))d=g[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:
-(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText),l=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(x){}try{var g=c.getElementsByTagName("span"),p=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):
-decodeURIComponent(f);this.isCompatibleString(p)&&(l=!0,f=p)}catch(x){}try{var q=this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:(q.lastPasteXml=f,q.pasteCounter=0);var B=q.pasteCounter*q.gridSize;if(l||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,B,B));else if(e&&1==q.getSelectionCount())q.labelChanged(q.getSelectionCell(),f),Graph.isLink(f)&&q.setLinkForCell(q.getSelectionCell(),f);else{var A=q.getInsertPoint();q.isMouseInsertPoint()&&(B=0,q.lastPasteXml==
-f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f,A.x+B,A.y+B,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(x){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(x){this.handleError(x)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],
-"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||
-"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,
-"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=b,d=d.getElementsByTagName("img"),0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?
-(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};
-EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,e;if(null==a){e=document.body;var l=document.documentElement;d=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=c+"px";l.style.left=b+"px";l.style.width=
-Math.max(0,d-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFiles=
-function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":
-f+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,
-mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,
-f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==
-d.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,b)}));else{if("image/png"==a.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(d);null!=g&&(d=g)}this.spinner.stop();this.openLocalFile(d,f,b)}}}catch(D){this.handleError(D)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
-window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-a,b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=
-function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=
-function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
-a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
-this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();
-window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var c=this.editor.graph;return{event:a,
-pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,d=!1,e=null,l=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=Graph.decompress(a)))}catch(ha){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(Y){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?
-mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),
-mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(Y){k.postMessage(JSON.stringify({event:"draft",
-error:Y.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,
-function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,
-!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var C=
-null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,C):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,y=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();
-var c=this.createLoadMessage("export");c.format=g.format;c.message=g;c.data=a;c.xml=encodeURIComponent(J);k.postMessage(JSON.stringify(c),"*")}),K=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);y(a)}),z=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
-z){for(var L=I.getGlobalVariable,I=this.createTemporaryGraph(I.getStylesheet()),P,H=0;H<this.pages.length;H++)if(this.pages[H].getId()==z){P=this.updatePageRoot(this.pages[H]);break}I.getGlobalVariable=function(a){return"page"==a?P.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(P.root)}if(null!=g.layerIds){for(var S=I.model,ca=S.getChildCells(S.getRoot()),m={},H=0;H<g.layerIds.length;H++)m[g.layerIds[H]]=!0;for(H=0;H<ca.length;H++)S.setVisible(ca[H],
-m[ca[H].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){K(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){K(null)}),null,null,g.scale,null,null,null,I)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=z?"&pageId="+z:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()?y("data:image/png;base64,"+a.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);C=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();C.xml=mxUtils.getXml(aa);C.data=this.getFileData(null,null,!0,null,null,null,aa);C.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),
-C.data=this.getHtml(J,this.editor.graph),C.xml=mxUtils.getXml(J),C.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var da=this.editor.graph.background;da==mxConstants.NONE&&(da=null);C.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);C.format="svg";var ga=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();C.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(C),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,
-null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(C.xml,this.editor.graph,null,!0,ga,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var T=this.editor.graph.getSvg(da);this.embedFonts(T,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){ga(mxUtils.getXml(a))})):ga(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(C),
-"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight=
-"38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",
-data:JSON.stringify(g)}),"*");return}}catch(Y){this.handleError(Y)}}var X=mxUtils.bind(this,function(f,g){b=!0;try{a(f,g)}catch(U){this.handleError(U)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=l();if(d!=e&&!b){var f=this.createLoadMessage("autosave");f.xml=d;d=
-JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",
-c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){X(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),
-l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&X(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){X(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):
-(g=l(g),X(g,f))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?
-(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
-mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight=
-"20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),
-this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var l in a[f].config)e[l]=a[f].config[l];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-
-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var l={},k=null,q=null,F=null,D=null,B=null,A=null,x=null,E=null,G="",C="auto",J="auto",I=null,y=null,K=40,z=40,L=100,P=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=b?b(oa):(H.setSelectionCells(oa),H.scrollCellToVisible(H.getSelectionCell()))},ca=H.getFreeInsertPoint(),aa=ca.x,da=ca.y,ca=da,ga=null,T="auto",E=null,X=[],Y=null,ha=null,V=0;V<c.length&&"#"==c[V].charAt(0);){a=
-c[V];for(V++;V<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[V].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[V].substring(1)),V++;if("#"!=a.charAt(1)){var U=a.indexOf(":");if(0<U){var Q=mxUtils.trim(a.substring(1,U)),N=mxUtils.trim(a.substring(U+1));"label"==Q?ga=H.sanitizeHtml(N):"labelname"==Q&&0<N.length&&"-"!=N?D=N:"labels"==Q&&0<N.length&&"-"!=N?B=JSON.parse(N):"style"==Q?k=N:"parentstyle"==Q?A=N:"stylename"==Q&&0<N.length&&"-"!=N?F=N:"styles"==Q&&0<N.length&&"-"!=N?q=JSON.parse(N):"identity"==
-Q&&0<N.length&&"-"!=N?x=N:"parent"==Q&&0<N.length&&"-"!=N?E=N:"namespace"==Q&&0<N.length&&"-"!=N?G=N:"width"==Q?C=N:"height"==Q?J=N:"left"==Q&&0<N.length?I=N:"top"==Q&&0<N.length?y=N:"ignore"==Q?ha=N.split(","):"connect"==Q?X.push(JSON.parse(N)):"link"==Q?Y=N:"padding"==Q?P=parseFloat(N):"edgespacing"==Q?K=parseFloat(N):"nodespacing"==Q?z=parseFloat(N):"levelspacing"==Q?L=parseFloat(N):"layout"==Q&&(T=N)}}}if(null==c[V])throw Error(mxResources.get("invalidOrMissingFile"));for(var ba=this.editor.csvToArray(c[V]),
-Q=U=null,N=[],O=0;O<ba.length;O++)x==ba[O]&&(U=O),E==ba[O]&&(Q=O),N.push(mxUtils.trim(ba[O]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ga&&(ga="%"+N[0]+"%");if(null!=X)for(var Z=0;Z<X.length;Z++)null==l[X[Z].to]&&(l[X[Z].to]={});x=[];for(O=V+1;O<c.length;O++){var fa=this.editor.csvToArray(c[O]);if(null==fa){var ya=40<c[O].length?c[O].substring(0,40)+"...":c[O];throw Error(ya+" ("+O+"):\n"+mxResources.get("containsValidationErrors"));}0<fa.length&&x.push(fa)}H.model.beginUpdate();
-try{for(O=0;O<x.length;O++){var fa=x[O],M=null,ja=null!=U?G+fa[U]:null;null!=ja&&(M=H.model.getCell(ja));var c=null!=M,W=new mxCell(ga,new mxGeometry(aa,ca,0,0),k||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=ja;for(var ea=0;ea<fa.length;ea++)H.setAttributeForCell(W,N[ea],fa[ea]);if(null!=D&&null!=B){var na=B[W.getAttribute(D)];null!=na&&H.labelChanged(W,na)}if(null!=F&&null!=q){var pa=q[W.getAttribute(F)];null!=pa&&(W.style=pa)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,
-W.style);c&&(H.model.setGeometry(M,W.geometry),H.model.setStyle(M,W.style),0>mxUtils.indexOf(f,M)&&f.push(M));M=W;if(!c)for(Z=0;Z<X.length;Z++)l[X[Z].to][M.getAttribute(X[Z].to)]=M;null!=Y&&"link"!=Y&&(H.setLinkForCell(M,M.getAttribute(Y)),H.setAttributeForCell(M,Y,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var ka=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=I&&null!=M.getAttribute(I)&&(M.geometry.x=aa+parseFloat(M.getAttribute(I))),null!=y&&null!=M.getAttribute(y)&&
-(M.geometry.y=da+parseFloat(M.getAttribute(y))),"@"==C.charAt(0)&&null!=M.getAttribute(C.substring(1))?M.geometry.width=parseFloat(M.getAttribute(C.substring(1))):M.geometry.width="auto"==C?ka.width+P:parseFloat(C),"@"==J.charAt(0)&&null!=M.getAttribute(J.substring(1))?M.geometry.height=parseFloat(M.getAttribute(J.substring(1))):M.geometry.height="auto"==J?ka.height+P:parseFloat(J),ca+=M.geometry.height+z);c?(null==e[ja]&&(e[ja]=[]),e[ja].push(M)):(E=null!=Q?H.model.getCell(G+fa[Q]):null,d.push(M),
-null!=E?(E.style=H.replacePlaceholders(E,A),H.addCell(M,E)):f.push(H.addCell(M)))}for(var qa=f.slice(),oa=f.slice(),Z=0;Z<X.length;Z++)for(var Aa=X[Z],O=0;O<d.length;O++){var M=d[O],ua=mxUtils.bind(this,function(a,c,b){var d=c.getAttribute(b.from);if(null!=d&&(H.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),f=0;f<d.length;f++){var e=l[b.to][d[f]];if(null!=e){var g=b.label;null!=b.fromlabel&&(g=(c.getAttribute(b.fromlabel)||"")+(g||""));null!=b.tolabel&&(g=(g||"")+(e.getAttribute(b.tolabel)||
-""));var m="target"==b.placeholders==!b.invert?e:a,m=null!=b.style?H.replacePlaceholders(m,b.style):H.createCurrentEdgeStyle();oa.push(H.insertEdge(null,null,g||"",b.invert?e:a,b.invert?a:e,m));mxUtils.remove(b.invert?a:e,qa)}}});ua(M,M,Aa);if(null!=e[M.id])for(ea=0;ea<e[M.id].length;ea++)ua(M,e[M.id][ea],Aa)}if(null!=ha)for(O=0;O<d.length;O++)for(M=d[O],ea=0;ea<ha.length;ea++)H.setAttributeForCell(M,mxUtils.trim(ha[ea]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(H);ra.spacing=K;var sa=
-function(){0<ra.spacing&&ra.execute(H.getDefaultParent());for(var a=0;a<f.length;a++){var c=H.getCellGeometry(f[a]);c.x=Math.round(H.snap(c.x));c.y=Math.round(H.snap(c.y));"auto"==C&&(c.width=Math.round(H.snap(c.width)));"auto"==J&&(c.height=Math.round(H.snap(c.height)))}};if("["==T.charAt(0)){var ta=S;H.view.validate();this.executeLayoutList(JSON.parse(T),function(){sa();ta()});S=null}else if("circle"==T){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var Da=ma.isVertexIgnored;ma.isVertexIgnored=
-function(a){return Da.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent());sa()},!0,S);S=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&oa.length==2*f.length-1&&1==qa.length){H.view.validate();var wa=new mxCompactTreeLayout(H,"horizontaltree"==T);wa.levelDistance=z;wa.edgeRouting=!1;wa.resetEdges=!1;this.executeLayout(function(){wa.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==
-T||"verticalflow"==T||"auto"==T&&1==qa.length){H.view.validate();var la=new mxHierarchicalLayout(H,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);la.intraCellSpacing=z;la.parallelEdgeSpacing=K;la.interRankCellSpacing=L;la.disableEdgeStyle=!1;this.executeLayout(function(){la.execute(H.getDefaultParent(),oa);H.moveCells(oa,aa,da)},!0,S);S=null}else if("organic"==T||"auto"==T&&oa.length>f.length){H.view.validate();var za=new mxFastOrganicLayout(H);za.forceConstant=3*z;za.resetEdges=
-!1;var Ia=za.isVertexIgnored;za.isVertexIgnored=function(a){return Ia.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(H);ra.spacing=K;this.executeLayout(function(){za.execute(H.getDefaultParent());sa()},!0,S);S=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=S&&S()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>
-mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};
-EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var c=k.apply(this,arguments),b=this.editor.graph,d=c.getSourceGraphBounds;c.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(b.container)&&b.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,
-0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/c),Math.ceil(this.source.minimumGraphSize.height-2*a.y/c))}return d.apply(this,arguments)};var e=c.getSourceContainerSize;c.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*c-2*a.x),Math.ceil(this.source.minimumGraphSize.height*c-2*a.y))}return e.apply(this,
-arguments)};c.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(c.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(c.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var l=c.init;c.init=function(){l.apply(this,arguments);c.outline.view.getBackgroundPageBounds=
-function(){var a=b.getPageLayout(),c=b.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,this.scale*a.height*c.height)};c.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,b){var d=b.getProperty("change"),f=c.source,e=c.outline;e.pageScale=f.pageScale;e.pageFormat=f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=
-mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);c.outline.view.clear(d.previousPage.root,!0);c.outline.view.validate()});return c};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&
-"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());
-this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);
-this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&
-!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
-d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);
-this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=
-function(a,b,d,e,l,k,q){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,l,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),m=Math.floor(g.width*l/c.view.scale),n=Math.floor(g.height*l/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var p=
-{globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<q?"&dpi="+q:"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+n+"&border="+k+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(l,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,q):a.exportImage(l,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
-EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=
-function(a){var c={},b=document.createElement("div");b.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";b.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();
-for(a=0;a<k.length;a++){var q=k[a];if("R"==q.substring(0,1)){var u=JSON.parse(decodeURIComponent(q.substring(1)));l[u[0]]={id:u[0],title:u[1],downloadUrl:u[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var b=0;b<a.length;b++){var d=a[b];l[d.id]&&(c[d.id]=d);var f=this.addCheckbox(e,d.title,l[d.id]);
-(function(a,b){mxEvent.addListener(b,"change",function(){this.checked?c[a.id]=a:delete c[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c,mxResources.get("error")+": ");mxUtils.write(c,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(c)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
-var a=0,b;for(b in c)null==l[b]&&(a++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],null,mxUtils.bind(this,function(b){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,b,c))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(c[b]));for(b in l)c[b]||this.closeLibrary(new RemoteLibrary(this,null,l[b]));
-0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(b.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=
-[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var c=0;c<this.remoteInvokeQueue.length;c++)a.postMessage(this.remoteInvokeQueue[c],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var c=a.msgMarkers,b=this.remoteInvokeCallbacks[c.callbackId];if(null==b)throw Error("No callback for "+(null!=c?c.callbackId:"null"));a.error?b.error&&b.error(a.error.errResp):b.callback&&b.callback.apply(this,a.resp);this.remoteInvokeCallbacks[c.callbackId]=
-null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,l){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,
-"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(c,b){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=b?d.error={errResp:b}:null!=c&&(d.resp=c);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,f=this.remoteInvokableFns[d];if(null!=f&&"function"===typeof this[d]){if(f.allowedDomains){for(var e=!1,l=0;l<f.allowedDomains.length;l++)if(b=="https://"+f.allowedDomains[l]){e=!0;break}if(!e){c(null,
-"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(f.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,k);else{var q=this[d].apply(this,k);c([q])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(F){c(null,"Invalid Call: An error occured, "+F.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||
-window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=b&&b(v)}};d.onsuccess=mxUtils.bind(this,function(c){var b=d.result;this.database=b;EditorUi.migrateStorageFiles&&(StorageFile.migrate(b),EditorUi.migrateStorageFiles=
-!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var b=!0,d=!1,f,e=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);
-c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){e++;m()}),m=mxUtils.bind(this,function(){try{if(e>=f.length)g();else{var a=f[e];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(b){null==b||".scratchpad"==a&&b==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(J){console.log(J)}}),k=mxUtils.bind(this,
-function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(J){console.log(J)}});a=mxUtils.bind(this,function(a){try{if(a.source==c.contentWindow){var e={};try{e=JSON.parse(a.data)}catch(I){}"init"==e.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),
-"*")):"remoteInvokeResponse"!=e.event||d||(b?null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?(f=e.resp[0],b=!1,m()):g():null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?k(e.resp[0]):l())}}catch(I){console.log(I)}});window.addEventListener("message",a)}})));a(b);b.onversionchange=function(){b.close()}});d.onerror=b;d.onblocked=function(){}}catch(m){null!=b&&b(m)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,e,l){this.openDatabase(mxUtils.bind(this,function(c){try{l=
-l||"objects";Array.isArray(l)||(l=[l],a=[a],b=[b]);var f=c.transaction(l,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<l.length;c++)f.objectStore(l[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(t){null!=e&&e(t)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);c=c.transaction(e,"readwrite");c.oncomplete=b;c.onerror=d;for(var f=0;f<e.length;f++)c.objectStore(e[f])["delete"](a[f])}),
-d)};EditorUi.prototype.getDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){try{e=e||"objects";var f=c.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(c){null==
-c.target.result?a(f):(f.push(c.target.result.value),c.target.result["continue"]())};e.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():
-!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(a,b,d,e,l,k,q,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,d,e,l,k,q,t)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,
-b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,k,q,t,u,F,D,B,A,x,E){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,e,l,k,q,t,u,F,D,B,A,x,E)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
-EditorUi.prototype.convertImages=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,d,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
-return Editor.updateCRC(a,b,d,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,l){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,d,e,l)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=
-localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var l="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(l||e)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===
-b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,b,e,d,k,l){function q(){for(var a=B.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==B&&b++;A.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(l);b.removeChild(k);g.style.display="block";f.style.display="block"}u={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");if(0<=g&&g<e.length)f=e.substring(g+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(B){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,e);var l=new XMLHttpRequest;
+l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(x){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(A){d(A)}else d({})});l.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(B){d(B)}}else this.spinner.stop(),
+this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(m){d(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
+this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
+"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(m){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(m){null!=window.console&&
+console.error(m),d(m)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=
+!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));d(c.convertDataUri(Editor.createSvgDataUri(a)),f,
+g)}else e({message:mxResources.get("invalidInput")})}catch(B){e(B)}})}catch(v){e(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+
+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType=
+"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=c.result,m=g.indexOf(","),l=decodeURIComponent(escape(atob(g.substring(m+1)))),n=mxUtils.parseXml(l).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}d(c.result,a,
+f)}catch(J){e(J)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,m,l,k){l=null!=l?l:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&
+!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=
+Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,l,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,d,l,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f,
+b,d,l,!0);if(0<g.length)return g}catch(C){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),
+g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=
+Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(c){this.editor.graph.setSelectionCells(this.importXml(c,b,d,l));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
+mxUtils.bind(this,function(){var c=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(c.container,610,360,!0,!1);c.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;m=null;c.getModel().beginUpdate();try{m=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
+a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");m.value=a;c.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var n=c.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=n.width;m.geometry.height=n.height}Graph.isLink(m.value)&&c.setLinkForCell(m,m.value);m.geometry.width+=c.gridSize;m.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<
+a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
+14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
+if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
+360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,m=!1;f.forEach(function(a,
+c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(m=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):m||d()}},
+function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,d,e,m,l,k,t,u,q,B){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):c=this.importXml(a,d,e,q);null!=t&&t(c)});"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=B?null:
+this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),u=!0)),u||(b=this.editor.graph,B=a.indexOf(";"),0<B&&(a=a.substring(0,B)+a.substring(a.indexOf(",",B+1))),q&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,m,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=u&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
+/(\.vs(x|sx?))($|\?)/i.test(k))?(c=!0,this.importVisio(u,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(c=!0,this.parseFile(null!=u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=t&&t(null))}),k)):0==a.indexOf("PK")&&null!=u?(c=!0,this.importZipFile(u,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
+/(\.vs(s|x))($|\?)/i.test(k)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==t||t(f);return f};EditorUi.prototype.importFiles=function(a,b,d,e,m,l,k,t,u,q,B,C){e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=B||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=
+this.editor.graph,n=g.gridSize;m=null!=m?m:mxUtils.bind(this,function(a,b,d,f,e,g,m,l,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,m)),null):this.importFile(a,b,d,f,e,g,m,l,n,c,C)}catch(V){return this.handleError(V),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,u=p,v=[],x=mxUtils.bind(this,function(a,c){v[a]=c;if(0==
+--u){this.spinner.stop();if(null!=t)t(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}l(b)}}),E=0;E<p;E++)mxUtils.bind(this,function(c){var l=a[c];if(null!=l){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var p=a.target.result,u=p.indexOf(","),t=decodeURIComponent(escape(atob(p.substring(u+1)))),
+z=mxUtils.parseXml(t),t=z.getElementsByTagName("svg");if(0<t.length){var t=t[0],v=C?null:t.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var f=a[0],k=f.getAttribute("width"),t=
+f.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox","0 0 "+k+" "+t);else if(isNaN(k)||isNaN(t)){var v=q.split(" ");3<v.length&&(k=parseFloat(v[2]),t=parseFloat(v[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,k)),e/Math.max(1,t)),E=m(p,l.type,b+c*n,d+c*n,Math.max(1,Math.round(k*x)),Math.max(1,Math.round(t*
+x)),l.name);if(isNaN(k)||isNaN(t)){var y=new Image;y.onload=mxUtils.bind(this,function(){k=Math.max(1,y.width);t=Math.max(1,y.height);E[0].geometry.width=k;E[0].geometry.height=t;f.setAttribute("viewBox","0 0 "+k+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));g.setCellStyles("image",p,[E[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return E}}}catch(W){}return null})):x(c,mxUtils.bind(this,function(){return m(v,
+"text/xml",b+c*n,d+c*n,0,0,l.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==l.type){var E=C?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var y=new Image;y.src=a.target.result;x(c,mxUtils.bind(this,function(){return m(E,"text/xml",b+c*n,d+c*n,y.width,y.height,l.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,p){x(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var u=f&&this.isResampleImage(a.target.result,B)?Math.min(1,Math.min(e/k,e/p)):1;return m(g,l.type,b+c*n,d+c*n,Math.round(k*u),Math.round(p*u),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),f,e,B)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,m(p,l.type,b+c*n,d+c*n,240,160,l.name,function(a){x(c,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?m(null,l.type,b+c*n,d+c*n,240,160,l.name,function(a){x(c,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?p.readAsDataURL(l):p.readAsText(l)}})(E)});if(g){g=[];
+for(p=0;p<a.length;p++)g.push(a[p]);a=g;this.confirmImageResize(function(a){f=a;v()},u)}else v()};EditorUi.prototype.confirmImageResize=function(a,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);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,m,l){m=null!=m?m:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/m,f/m);if(1<g){var k=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas");
+p.width=k;p.height=n;p.getContext("2d").drawImage(a,0,0,k,n);var q=p.toDataURL();if(q.length<b.length){var x=document.createElement("canvas");x.width=k;x.height=n;var E=x.toDataURL();q!==E&&(b=q,c=k,f=n)}}}catch(G){}d(b,c,f)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d);
+c.src=a}catch(m){if(null!=d)d(m);else throw m;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("plantUml")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&
+a.generatePlantUmlImage(d,e.format,function(f,g,m){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==e.format)b.labelChanged(c,"<pre>"+f+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=g,l.height=m,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:e.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,
+420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("mermaid")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,e.config,function(f,g,m){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",f,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,g),l.height=Math.max(l.height,m),b.cellsResized([c],[l],!1));b.setAttributeForCell(c,
+"mermaidData",JSON.stringify({data:d,config:e.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var e=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,b){try{var d=this.graph.getAttributeForCell(c,"plantUmlData");null!=d?this.editPlantUmlData(c,b,d):(d=this.graph.getAttributeForCell(c,"mermaidData"),null!=d?this.editMermaidData(c,b,d):e.apply(this,arguments))}catch(G){a.handleError(G)}};
+b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(E){a.handleError(E)}return b};var l=this.clearDefaultStyle;this.clearDefaultStyle=function(){l.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var m=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!=
+a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?"&":"?")+"dev=1&drawdev=1");return m.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&
+mxEvent.consume(a);null!=f&&f(a,c)};k.call(this,a,c,d)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var q=b.getExportVariables;b.getExportVariables=function(){var c=q.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());
+c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return c};var t=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages?
+a.pages.length:1:t.apply(this,arguments)};var u=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))u.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};
+var F=this.actions.get("print");F.setEnabled(!mxClient.IS_IOS||!navigator.standalone);F.visible=F.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",
+!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=this.editor.graph,b=c.cellEditor.text2,d=null;null!=b&&(mxEvent.addListener(b,"dragleave",
+function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(b));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,b,d,f,
+e,g){c.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var b=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)?this.loadImage(decodeURIComponent(b),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,
+a));c.insertImage(decodeURIComponent(b),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(F=this.editor.graph.view,
+F.setUnit(mxSettings.getUnit()),F.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,F.unit),this.refresh());if("1"==urlParams.styledev){F=document.getElementById("geFooter");null!=F&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type",
+"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),F.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var B=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:B.apply(this,arguments)}}F=document.getElementById("geInfo");null!=F&&F.parentNode.removeChild(F);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var C=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,
+function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=e=null),this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=e=0);var m=0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var k=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(k=!0)):(d=c.getElementsByTagName("a"),null!=
+d&&1==d.length?l=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,g,!0,k,null,n))});k&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=m&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)?this.loadImage(decodeURIComponent(m),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,
+a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+m+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(m,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();
+a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,f=0;f<b.types.length;f++)if("text/"===b.types[f].substring(0,5)){d=!0;break}if(!d){var e=b.items;for(index in e){var l=e[index];
+if("file"===l.kind){if(a.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(c,b,d,f,e,g){a.insertImage(c,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML=
+"&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow=
+"hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
+b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:m.apply(this,arguments)}};
+EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("customFonts");this.menus.customFonts=c;mxSettings.setCustomFonts(c);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));
+this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
+function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=
+null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d,e){if(!mxEvent.isConsumed(a)){var c=b,f=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){c=document.createElement("div");c.innerHTML=g;f=!0;g=c.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&
+null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(g=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,g==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,g),f=!1));Graph.removePasteFormatting(c)}else g=a.clipboardData.getData("text/plain"),
+null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,g))}g=c.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))d=g[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,
+b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText),l=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(x){}try{var g=c.getElementsByTagName("span"),p=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(p)&&(l=!0,f=p)}catch(x){}try{var q=
+this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:(q.lastPasteXml=f,q.pasteCounter=0);var C=q.pasteCounter*q.gridSize;if(l||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,C,C));else if(e&&1==q.getSelectionCount())q.labelChanged(q.getSelectionCell(),f),Graph.isLink(f)&&q.setLinkForCell(q.getSelectionCell(),f);else{var A=q.getInsertPoint();q.isMouseInsertPoint()&&(C=0,q.lastPasteXml==f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f,
+A.x+C,A.y+C,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(x){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(x){this.handleError(x)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);
+a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),
+"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,
+"text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=b,d=d.getElementsByTagName("img"),0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,
+function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,e;if(null==a){e=document.body;
+var l=document.documentElement;d=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=c+"px";l.style.left=b+"px";l.style.width=Math.max(0,d-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?
+this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=
+0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&
+this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,
+f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();
+e(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,b)}));else{if("image/png"==a.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(d);null!=g&&(d=g)}this.spinner.stop();this.openLocalFile(d,f,b)}}}catch(B){this.handleError(B)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===
+a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):
+f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));
+null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=
+a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&
+this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);
+null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<
+this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,
+page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,d=!1,e=null,l=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=
+f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ha){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(Y){g=null}try{if(null==
+g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},
+null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),
+g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(Y){k.postMessage(JSON.stringify({event:"draft",error:Y.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=
+1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):
+null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==
+g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var D=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,
+D):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,y=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=g.format;c.message=g;c.data=a;c.xml=encodeURIComponent(J);
+k.postMessage(JSON.stringify(c),"*")}),K=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);y(a)}),z=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=z){for(var L=I.getGlobalVariable,I=this.createTemporaryGraph(I.getStylesheet()),P,H=0;H<this.pages.length;H++)if(this.pages[H].getId()==
+z){P=this.updatePageRoot(this.pages[H]);break}I.getGlobalVariable=function(a){return"page"==a?P.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(P.root)}if(null!=g.layerIds){for(var S=I.model,ca=S.getChildCells(S.getRoot()),m={},H=0;H<g.layerIds.length;H++)m[g.layerIds[H]]=!0;for(H=0;H<ca.length;H++)S.setVisible(ca[H],m[ca[H].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){K(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
+function(){K(null)}),null,null,g.scale,null,null,null,I)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=z?"&pageId="+z:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?y("data:image/png;base64,"+a.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!=
+g.xml&&0<g.xml.length&&this.setFileData(g.xml);D=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();D.xml=mxUtils.getXml(aa);D.data=this.getFileData(null,null,!0,null,null,null,aa);D.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),D.data=this.getHtml(J,this.editor.graph),D.xml=mxUtils.getXml(J),D.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var da=this.editor.graph.background;
+da==mxConstants.NONE&&(da=null);D.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);D.format="svg";var ga=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();D.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(D),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(D.xml,this.editor.graph,null,!0,ga,null,null,g.embedImages);else if(null==
+g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var T=this.editor.graph.getSvg(da);this.embedFonts(T,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){ga(mxUtils.getXml(a))})):ga(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(D),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&
+(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&
+this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(Y){this.handleError(Y)}}var X=
+mxUtils.bind(this,function(f,g){b=!0;try{a(f,g)}catch(U){this.handleError(U)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=l();if(d!=e&&!b){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),
+this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",
+c));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){X(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&X(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){X(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),X(g,f))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?
+JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
+mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
+mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));
+a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var l in a[f].config)e[l]=a[f].config[l];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var l={},k=null,
+q=null,F=null,B=null,C=null,A=null,x=null,E=null,G="",D="auto",J="auto",I=null,y=null,K=40,z=40,L=100,P=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=b?b(oa):(H.setSelectionCells(oa),H.scrollCellToVisible(H.getSelectionCell()))},ca=H.getFreeInsertPoint(),aa=ca.x,da=ca.y,ca=da,ga=null,T="auto",E=null,X=[],Y=null,ha=null,V=0;V<c.length&&"#"==c[V].charAt(0);){a=c[V];for(V++;V<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[V].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[V].substring(1)),
+V++;if("#"!=a.charAt(1)){var U=a.indexOf(":");if(0<U){var Q=mxUtils.trim(a.substring(1,U)),N=mxUtils.trim(a.substring(U+1));"label"==Q?ga=H.sanitizeHtml(N):"labelname"==Q&&0<N.length&&"-"!=N?B=N:"labels"==Q&&0<N.length&&"-"!=N?C=JSON.parse(N):"style"==Q?k=N:"parentstyle"==Q?A=N:"stylename"==Q&&0<N.length&&"-"!=N?F=N:"styles"==Q&&0<N.length&&"-"!=N?q=JSON.parse(N):"identity"==Q&&0<N.length&&"-"!=N?x=N:"parent"==Q&&0<N.length&&"-"!=N?E=N:"namespace"==Q&&0<N.length&&"-"!=N?G=N:"width"==Q?D=N:"height"==
+Q?J=N:"left"==Q&&0<N.length?I=N:"top"==Q&&0<N.length?y=N:"ignore"==Q?ha=N.split(","):"connect"==Q?X.push(JSON.parse(N)):"link"==Q?Y=N:"padding"==Q?P=parseFloat(N):"edgespacing"==Q?K=parseFloat(N):"nodespacing"==Q?z=parseFloat(N):"levelspacing"==Q?L=parseFloat(N):"layout"==Q&&(T=N)}}}if(null==c[V])throw Error(mxResources.get("invalidOrMissingFile"));for(var ba=this.editor.csvToArray(c[V]),Q=U=null,N=[],O=0;O<ba.length;O++)x==ba[O]&&(U=O),E==ba[O]&&(Q=O),N.push(mxUtils.trim(ba[O]).replace(/[^a-z0-9]+/ig,
+"_").replace(/^\d+/,"").replace(/_+$/,""));null==ga&&(ga="%"+N[0]+"%");if(null!=X)for(var Z=0;Z<X.length;Z++)null==l[X[Z].to]&&(l[X[Z].to]={});x=[];for(O=V+1;O<c.length;O++){var fa=this.editor.csvToArray(c[O]);if(null==fa){var ya=40<c[O].length?c[O].substring(0,40)+"...":c[O];throw Error(ya+" ("+O+"):\n"+mxResources.get("containsValidationErrors"));}0<fa.length&&x.push(fa)}H.model.beginUpdate();try{for(O=0;O<x.length;O++){var fa=x[O],M=null,ja=null!=U?G+fa[U]:null;null!=ja&&(M=H.model.getCell(ja));
+var c=null!=M,W=new mxCell(ga,new mxGeometry(aa,ca,0,0),k||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=ja;for(var ea=0;ea<fa.length;ea++)H.setAttributeForCell(W,N[ea],fa[ea]);if(null!=B&&null!=C){var na=C[W.getAttribute(B)];null!=na&&H.labelChanged(W,na)}if(null!=F&&null!=q){var pa=q[W.getAttribute(F)];null!=pa&&(W.style=pa)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);c&&(H.model.setGeometry(M,W.geometry),H.model.setStyle(M,W.style),0>mxUtils.indexOf(f,M)&&
+f.push(M));M=W;if(!c)for(Z=0;Z<X.length;Z++)l[X[Z].to][M.getAttribute(X[Z].to)]=M;null!=Y&&"link"!=Y&&(H.setLinkForCell(M,M.getAttribute(Y)),H.setAttributeForCell(M,Y,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var ka=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=I&&null!=M.getAttribute(I)&&(M.geometry.x=aa+parseFloat(M.getAttribute(I))),null!=y&&null!=M.getAttribute(y)&&(M.geometry.y=da+parseFloat(M.getAttribute(y))),"@"==D.charAt(0)&&null!=M.getAttribute(D.substring(1))?
+M.geometry.width=parseFloat(M.getAttribute(D.substring(1))):M.geometry.width="auto"==D?ka.width+P:parseFloat(D),"@"==J.charAt(0)&&null!=M.getAttribute(J.substring(1))?M.geometry.height=parseFloat(M.getAttribute(J.substring(1))):M.geometry.height="auto"==J?ka.height+P:parseFloat(J),ca+=M.geometry.height+z);c?(null==e[ja]&&(e[ja]=[]),e[ja].push(M)):(E=null!=Q?H.model.getCell(G+fa[Q]):null,d.push(M),null!=E?(E.style=H.replacePlaceholders(E,A),H.addCell(M,E)):f.push(H.addCell(M)))}for(var qa=f.slice(),
+oa=f.slice(),Z=0;Z<X.length;Z++)for(var Aa=X[Z],O=0;O<d.length;O++){var M=d[O],ua=mxUtils.bind(this,function(a,c,b){var d=c.getAttribute(b.from);if(null!=d&&(H.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),f=0;f<d.length;f++){var e=l[b.to][d[f]];if(null!=e){var g=b.label;null!=b.fromlabel&&(g=(c.getAttribute(b.fromlabel)||"")+(g||""));null!=b.tolabel&&(g=(g||"")+(e.getAttribute(b.tolabel)||""));var m="target"==b.placeholders==!b.invert?e:a,m=null!=b.style?H.replacePlaceholders(m,
+b.style):H.createCurrentEdgeStyle();oa.push(H.insertEdge(null,null,g||"",b.invert?e:a,b.invert?a:e,m));mxUtils.remove(b.invert?a:e,qa)}}});ua(M,M,Aa);if(null!=e[M.id])for(ea=0;ea<e[M.id].length;ea++)ua(M,e[M.id][ea],Aa)}if(null!=ha)for(O=0;O<d.length;O++)for(M=d[O],ea=0;ea<ha.length;ea++)H.setAttributeForCell(M,mxUtils.trim(ha[ea]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(H);ra.spacing=K;var sa=function(){0<ra.spacing&&ra.execute(H.getDefaultParent());for(var a=0;a<f.length;a++){var c=
+H.getCellGeometry(f[a]);c.x=Math.round(H.snap(c.x));c.y=Math.round(H.snap(c.y));"auto"==D&&(c.width=Math.round(H.snap(c.width)));"auto"==J&&(c.height=Math.round(H.snap(c.height)))}};if("["==T.charAt(0)){var ta=S;H.view.validate();this.executeLayoutList(JSON.parse(T),function(){sa();ta()});S=null}else if("circle"==T){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var Da=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return Da.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent());
+sa()},!0,S);S=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&oa.length==2*f.length-1&&1==qa.length){H.view.validate();var wa=new mxCompactTreeLayout(H,"horizontaltree"==T);wa.levelDistance=z;wa.edgeRouting=!1;wa.resetEdges=!1;this.executeLayout(function(){wa.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&1==qa.length){H.view.validate();var la=new mxHierarchicalLayout(H,"horizontalflow"==T?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);la.intraCellSpacing=z;la.parallelEdgeSpacing=K;la.interRankCellSpacing=L;la.disableEdgeStyle=!1;this.executeLayout(function(){la.execute(H.getDefaultParent(),oa);H.moveCells(oa,aa,da)},!0,S);S=null}else if("organic"==T||"auto"==T&&oa.length>f.length){H.view.validate();var za=new mxFastOrganicLayout(H);za.forceConstant=3*z;za.resetEdges=!1;var Ia=za.isVertexIgnored;za.isVertexIgnored=function(a){return Ia.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(H);
+ra.spacing=K;this.executeLayout(function(){za.execute(H.getDefaultParent());sa()},!0,S);S=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=S&&S()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=
+function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=
+EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var c=k.apply(this,arguments),b=this.editor.graph,d=c.getSourceGraphBounds;c.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(b.container)&&b.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/c),Math.ceil(this.source.minimumGraphSize.height-2*a.y/c))}return d.apply(this,arguments)};
+var e=c.getSourceContainerSize;c.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*c-2*a.x),Math.ceil(this.source.minimumGraphSize.height*c-2*a.y))}return e.apply(this,arguments)};c.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();
+return new mxPoint(Math.round(Math.max(0,(c.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(c.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var l=c.init;c.init=function(){l.apply(this,arguments);c.outline.view.getBackgroundPageBounds=function(){var a=b.getPageLayout(),c=b.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+
+a.y*c.height),this.scale*a.width*c.width,this.scale*a.height*c.height)};c.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,b){var d=b.getProperty("change"),f=c.source,e=c.outline;e.pageScale=f.pageScale;e.pageFormat=f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&
+(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);c.outline.view.clear(d.previousPage.root,!0);c.outline.view.validate()});return c};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&
+c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);
+d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
+a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
+function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
+this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));
+this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};
+var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,l,k,q){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,
+"svg",mxUtils.getXml(c.getSvg(e,l,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),m=Math.floor(g.width*l/c.view.scale),n=Math.floor(g.height*l/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var p={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+(null!=a?"&filename="+encodeURIComponent(a):
+"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<q?"&dpi="+q:"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+n+"&border="+k+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(l,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,q):a.exportImage(l,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=
+a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var c={},b=document.createElement("div");b.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+b.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var q=k[a];if("R"==q.substring(0,1)){var u=JSON.parse(decodeURIComponent(q.substring(1)));l[u[0]]={id:u[0],title:u[1],downloadUrl:u[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML=
+"";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var b=0;b<a.length;b++){var d=a[b];l[d.id]&&(c[d.id]=d);var f=this.addCheckbox(e,d.title,l[d.id]);(function(a,b){mxEvent.addListener(b,"change",function(){this.checked?c[a.id]=a:delete c[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c,
+mxResources.get("error")+": ");mxUtils.write(c,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(c)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,b;for(b in c)null==l[b]&&(a++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],null,mxUtils.bind(this,function(b){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,b,c))}catch(x){this.handleError(x,
+mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(c[b]));for(b in l)c[b]||this.closeLibrary(new RemoteLibrary(this,null,l[b]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(b.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
+allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var c=0;c<this.remoteInvokeQueue.length;c++)a.postMessage(this.remoteInvokeQueue[c],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var c=
+a.msgMarkers,b=this.remoteInvokeCallbacks[c.callbackId];if(null==b)throw Error("No callback for "+(null!=c?c.callbackId:"null"));a.error?b.error&&b.error(a.error.errResp):b.callback&&b.callback.apply(this,a.resp);this.remoteInvokeCallbacks[c.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,l){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);
+c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(c,b){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=b?d.error={errResp:b}:null!=c&&(d.resp=
+c);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,f=this.remoteInvokableFns[d];if(null!=f&&"function"===typeof this[d]){if(f.allowedDomains){for(var e=!1,l=0;l<f.allowedDomains.length;l++)if(b=="https://"+f.allowedDomains[l]){e=!0;break}if(!e){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(f.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,
+k);else{var q=this[d].apply(this,k);c([q])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(F){c(null,"Invalid Call: An error occured, "+F.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),
+c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=b&&b(v)}};d.onsuccess=mxUtils.bind(this,function(c){var b=d.result;this.database=b;EditorUi.migrateStorageFiles&&(StorageFile.migrate(b),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var c=document.createElement("iframe");
+c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var b=!0,d=!1,f,e=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){e++;m()}),m=mxUtils.bind(this,function(){try{if(e>=f.length)g();else{var a=f[e];StorageFile.getFileContent(this,
+a,mxUtils.bind(this,function(b){null==b||".scratchpad"==a&&b==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(J){console.log(J)}}),k=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(J){console.log(J)}});a=mxUtils.bind(this,function(a){try{if(a.source==
+c.contentWindow){var e={};try{e=JSON.parse(a.data)}catch(I){}"init"==e.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=e.event||d||(b?null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?(f=e.resp[0],b=!1,m()):g():null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?k(e.resp[0]):l())}}catch(I){console.log(I)}});window.addEventListener("message",
+a)}})));a(b);b.onversionchange=function(){b.close()}});d.onerror=b;d.onblocked=function(){}}catch(m){null!=b&&b(m)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,e,l){this.openDatabase(mxUtils.bind(this,function(c){try{l=l||"objects";Array.isArray(l)||(l=[l],a=[a],b=[b]);var f=c.transaction(l,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<l.length;c++)f.objectStore(l[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(t){null!=e&&e(t)}}),e)};
+EditorUi.prototype.removeDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);c=c.transaction(e,"readwrite");c.oncomplete=b;c.onerror=d;for(var f=0;f<e.length;f++)c.objectStore(e[f])["delete"](a[f])}),d)};EditorUi.prototype.getDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){try{e=e||"objects";var f=c.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=
+d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(c){null==c.target.result?a(f):(f.push(c.target.result.value),c.target.result["continue"]())};e.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=
+d||"objects";var e=c.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():
+!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();
+return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==
+DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,e,l,k,q,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,d,e,l,k,q,t)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};
+EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,k,q,t,u,F,B,C,A,x,E){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(a,b,d,e,l,k,q,t,u,F,B,C,A,x,E)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,d,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,l){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
+return Editor.writeGraphModelToPng(a,b,d,e,l)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var l="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(l||
+e)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,b,e,d,k,l){function q(){for(var a=C.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==C&&b++;A.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(l);b.removeChild(k);g.style.display="block";f.style.display="block"}u={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
 "geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var k=document.createElement("div");k.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();u=null});m.className="geCommentEditBtn";k.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);u=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
 function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";k.appendChild(n);b.insertBefore(k,f);g.style.display="none";f.style.display="none";l.focus()}function f(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
 [e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function n(b,d,e,l,k){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function x(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function E(d,e,f,k,q){function u(){g(E);b.addReply(v,function(a){v.id=a;b.replies.push(v);m(E);f&&f()},function(b){t();p(E);a.handleError(b,null,
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});B.appendChild(e);d&&(e.style.display="none")}function x(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function E(d,e,f,k,q){function u(){g(E);b.addReply(v,function(a){v.id=a;b.replies.push(v);m(E);f&&f()},function(b){t();p(E);a.handleError(b,null,
 null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,q)}function t(){c(v,E,function(a){u()},!0)}var z=x().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var E=n(v,b.replies,z,l+1);e?t():u()}if(k||!b.isResolved){A.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite");
-var C=document.createElement("div");C.className="geCommentHeader";var L=document.createElement("img");L.className="geCommentUserImg";L.src=b.user.pictureUrl||Editor.userImage;C.appendChild(L);L=document.createElement("div");L.className="geCommentHeaderTxt";C.appendChild(L);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");L.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);f(b,
-F);L.appendChild(F);y.appendChild(C);C=document.createElement("div");C.className="geCommentTxt";mxUtils.write(C,b.content||"");y.appendChild(C);C=document.createElement("div");C.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";C.appendChild(D);v||0!=l&&!t||z(mxResources.get("reply"),function(){E("",!0)},b.isResolved);L=a.getCurrentUser();null==L||L.id!=b.user.id||v||(z(mxResources.get("edit"),function(){function d(){c(b,y,function(){g(y);b.editComment(b.content,
-function(){m(y)},function(b){p(y);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(y);b.deleteComment(function(){for(var a=x(b).replies,c=0;c<a.length;c++)B.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}A.style.display=0==B.getElementsByTagName("div").length?"block":"none"},function(b){p(y);a.handleError(b,null,null,
+var D=document.createElement("div");D.className="geCommentHeader";var L=document.createElement("img");L.className="geCommentUserImg";L.src=b.user.pictureUrl||Editor.userImage;D.appendChild(L);L=document.createElement("div");L.className="geCommentHeaderTxt";D.appendChild(L);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");L.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);f(b,
+F);L.appendChild(F);y.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D,b.content||"");y.appendChild(D);D=document.createElement("div");D.className="geCommentActions";var B=document.createElement("ul");B.className="geCommentActionsList";D.appendChild(B);v||0!=l&&!t||z(mxResources.get("reply"),function(){E("",!0)},b.isResolved);L=a.getCurrentUser();null==L||L.id!=b.user.id||v||(z(mxResources.get("edit"),function(){function d(){c(b,y,function(){g(y);b.editComment(b.content,
+function(){m(y)},function(b){p(y);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(y);b.deleteComment(function(){for(var a=x(b).replies,c=0;c<a.length;c++)C.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}A.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){p(y);a.handleError(b,null,null,
 null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));v||0!=l||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=x(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),
-k=0;k<l.length;k++)l[k]!=c.parentNode&&(l[k].style.display=d);G||(e[g].style.display="none")}q()}b.isResolved?E(mxResources.get("reOpened")+": ",!0,c,!1,!0):E(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(C);null!=e?B.insertBefore(y,e.nextSibling):B.appendChild(y);for(e=0;null!=b.replies&&e<b.replies.length;e++)C=b.replies[e],C.isResolved=b.isResolved,n(C,b.replies,null,l+1,k);null!=u&&(u.comment.id==b.id?(k=b.content,b.content=u.comment.content,c(b,y,u.saveCallback,u.deleteOnCancel),
-b.content=k):null==u.comment.id&&u.comment.pCommentId==b.id&&(B.appendChild(u.div),c(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return y}}var v=!a.canComment(),t=a.canReplyToReplies(),u=null,F=document.createElement("div");F.className="geCommentsWin";F.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
-Dialog.backdropColor;B.style.bottom=parseInt(D)+7+"px";F.appendChild(B);var A=document.createElement("span");A.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(A,mxResources.get("noCommentsFound"));var x=document.createElement("div");x.className="geToolbarContainer geCommentsToolbar";x.style.height=D;x.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";x.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(x.style.filter=
-"none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!v){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){c(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;C.push(b);m(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var e=a.newComment("",a.getCurrentUser()),f=n(e,C,null,0);d();b.preventDefault();mxEvent.consume(b)});x.appendChild(E)}E=D.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";J();a.preventDefault();mxEvent.consume(a)});x.appendChild(E);a.commentsRefreshNeeded()&&
-(E=D.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){J();a.preventDefault();mxEvent.consume(a)}),x.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){l();a.preventDefault();mxEvent.consume(a)}),x.appendChild(D));F.appendChild(x);var C=[],J=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var b=u.div.querySelector(".geCommentEditTxtArea"),d=u.div.querySelector(".geCommentEditBtns");u.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(z){a.handleError(z)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});B.innerHTML="";B.appendChild(A);A.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies),
-n(C[a],C,null,0,G);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&(B.appendChild(u.div),c(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(a){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});J();this.refreshComments=J;x=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(f(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
-if(this.window.isVisible()){for(var b=B.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<C.length;d++)a(C[d])}});setInterval(x,6E4);this.refreshCommentsTime=x;this.window=new mxWindow(mxResources.get("comments"),F,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+k=0;k<l.length;k++)l[k]!=c.parentNode&&(l[k].style.display=d);G||(e[g].style.display="none")}q()}b.isResolved?E(mxResources.get("reOpened")+": ",!0,c,!1,!0):E(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(D);null!=e?C.insertBefore(y,e.nextSibling):C.appendChild(y);for(e=0;null!=b.replies&&e<b.replies.length;e++)D=b.replies[e],D.isResolved=b.isResolved,n(D,b.replies,null,l+1,k);null!=u&&(u.comment.id==b.id?(k=b.content,b.content=u.comment.content,c(b,y,u.saveCallback,u.deleteOnCancel),
+b.content=k):null==u.comment.id&&u.comment.pCommentId==b.id&&(C.appendChild(u.div),c(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return y}}var v=!a.canComment(),t=a.canReplyToReplies(),u=null,F=document.createElement("div");F.className="geCommentsWin";F.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var B=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+Dialog.backdropColor;C.style.bottom=parseInt(B)+7+"px";F.appendChild(C);var A=document.createElement("span");A.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(A,mxResources.get("noCommentsFound"));var x=document.createElement("div");x.className="geToolbarContainer geCommentsToolbar";x.style.height=B;x.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";x.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(x.style.filter=
+"none");B=document.createElement("a");B.className="geButton";mxClient.IS_QUIRKS&&(B.style.filter="none");if(!v){var E=B.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){c(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;D.push(b);m(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+!0)}var e=a.newComment("",a.getCurrentUser()),f=n(e,D,null,0);d();b.preventDefault();mxEvent.consume(b)});x.appendChild(E)}E=B.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";J();a.preventDefault();mxEvent.consume(a)});x.appendChild(E);a.commentsRefreshNeeded()&&
+(E=B.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){J();a.preventDefault();mxEvent.consume(a)}),x.appendChild(E));a.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
+(B.style.filter="invert(100%)"),mxEvent.addListener(B,"click",function(a){l();a.preventDefault();mxEvent.consume(a)}),x.appendChild(B));F.appendChild(x);var D=[],J=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var b=u.div.querySelector(".geCommentEditTxtArea"),d=u.div.querySelector(".geCommentEditBtns");u.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(z){a.handleError(z)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});C.innerHTML="";C.appendChild(A);A.style.display="block";D=a;for(a=0;a<D.length;a++)b(D[a].replies),
+n(D[a],D,null,0,G);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&(C.appendChild(u.div),c(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(a){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});J();this.refreshComments=J;x=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(f(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
+if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<D.length;d++)a(D[d])}});setInterval(x,6E4);this.refreshCommentsTime=x;this.window=new mxWindow(mxResources.get("comments"),F,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
 mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var I=mxUtils.bind(this,function(){var a=this.window.getX(),
 b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},ConfirmDialog=function(a,b,e,d,k,l,q,c,f,g,p){var m=document.createElement("div");m.style.textAlign="center";p=null!=p?p:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=p+"px";n.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(n.style.height="60px");mxUtils.write(n,b);
 m.appendChild(n);null!=g&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",g),n.appendChild(b),m.appendChild(n));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");l=mxUtils.button(l||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});l.className="geBtn";null!=c&&(l.innerHTML=c+"<br>"+l.innerHTML,l.style.paddingBottom=
@@ -3528,16 +3528,16 @@ null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/x-u.
 d==b?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=m(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var v=this,t=v.editor.graph,u=t.getModel(),F=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){F.apply(this,arguments);
 if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
 if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",
-function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];u.isEdge(g)&&e(g)&&(d.push(g),g=u.getTerminal(g,!1));if(a(g)){var l=[];t.traverse(g,!0,function(a,b){null!=b&&l.push(b);l.push(a);return!0});0<l.length&&(d=d.concat(l),g=t.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
-d))};var B=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var l=B.call(this,b,c);if(l.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var k=t.getIncomingEdges(l[e]),g=t.getIncomingEdges(b[e]);if(0==k.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
+function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var B=t.removeCells;t.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];u.isEdge(g)&&e(g)&&(d.push(g),g=u.getTerminal(g,!1));if(a(g)){var l=[];t.traverse(g,!0,function(a,b){null!=b&&l.push(b);l.push(a);return!0});0<l.length&&(d=d.concat(l),g=t.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return B.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+d))};var C=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var l=C.call(this,b,c);if(l.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var k=t.getIncomingEdges(l[e]),g=t.getIncomingEdges(b[e]);if(0==k.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
 t.getDefaultParent(),this.model.getTerminal(g[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var A=t.moveCells;t.moveCells=function(b,c,d,e,f,g,l){var k=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
 if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var x=t.view.getState(m);null!=x&&(c=(x.getCenterX()-u.getCenterX())/t.view.scale,d=(x.getCenterY()-u.getCenterY())/t.view.scale)}}}}k=A.apply(this,arguments);if(null!=k&&null!=b&&k.length==b.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))a(m)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
 this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(k[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,k[p])}}finally{this.model.endUpdate()}return k};if(null!=v.sidebar){var x=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),a(b))for(var l=0;l<g.length;l++)if(f.isEdge(g[l])&&
 null==f.getTerminal(g[l],!0)){f.setTerminal(g[l],b,!0);var k=t.getCellGeometry(g[l]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
 (9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=f(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
-null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(n(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var C=t.connectVertex;t.connectVertex=
-function(b,d,e,l,k,m){var n=t.getIncomingEdges(b);return a(b)?(e=c(b),l=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d||0==n.length?p(b,d):l==k?g(b):f(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):C.call(this,b,d,e,l,k,m)};t.getSubtree=function(c){var d=[c];!b(c)&&!a(c)||q(c)||t.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};
+null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(n(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var D=t.connectVertex;t.connectVertex=
+function(b,d,e,l,k,m){var n=t.getIncomingEdges(b);return a(b)?(e=c(b),l=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d||0==n.length?p(b,d):l==k?g(b):f(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):D.call(this,b,d,e,l,k,m)};t.getSubtree=function(c){var d=[c];!b(c)&&!a(c)||q(c)||t.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};
 var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
 mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this,arguments);null!=this.moveHandle&&
 (this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){y.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=
@@ -3653,9 +3653,9 @@ function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,
 this.scrollLeft=c.container.scrollLeft;this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<f&&Math.abs(this.scrollTop-c.container.scrollTop)<f&&Math.abs(this.startX-b.getGraphX())<f&&Math.abs(this.startY-b.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?l():q(30))}})}for(var g=this.toolbarItems,p=0,m=null,n=null,v=0;v<g.length;v++){var t=g[v];if("pages"==t){n=b.ownerDocument.createElement("div");
 n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");u.style.borderRightStyle="none";u.style.paddingLeft="0px";u.style.paddingRight="0px";e.appendChild(n);var F=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
 1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");F.style.paddingLeft="0px";F.style.paddingRight="0px";t=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";u.style.display=n.style.display;F.style.display=n.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==t){if(this.layersEnabled){var D=this.graph.getModel(),B=a(mxUtils.bind(this,function(a){if(null!=m)m.parentNode.removeChild(m),
-m=null;else{m=this.graph.createLayersDialog();mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});a=B.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";m.style.fontSize="11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var b=mxUtils.getDocumentScrollOrigin(document);m.style.left=b.x+a.left+
-"px";m.style.top=b.y+a.bottom+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){B.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});B.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==t){if(this.layersEnabled){var B=this.graph.getModel(),C=a(mxUtils.bind(this,function(a){if(null!=m)m.parentNode.removeChild(m),
+m=null;else{m=this.graph.createLayersDialog();mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});a=C.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";m.style.fontSize="11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var b=mxUtils.getDocumentScrollOrigin(document);m.style.left=b.x+a.left+
+"px";m.style.top=b.y+a.bottom+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");B.addListener(mxEvent.CHANGE,function(){C.style.display=1<B.getChildCount(B.root)?"inline-block":"none"});C.style.display=1<B.getChildCount(B.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
 null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*p);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,
 70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*p;var A=b.style.border,g=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-
 c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=m&&(m.parentNode.removeChild(m),
@@ -3681,7 +3681,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
 GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
 (function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
 new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,E,G,C=function(){if((E=b.offsetWidth)!=p||(G=b.offsetHeight)!=q)m=!0,p=E,q=G;g()},J=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};J(d,"scroll",C);J(f,"scroll",C)}var c=function(){GraphViewer.resizeSensorEnabled&&d()},f=Object.prototype.toString.call(e),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(g)for(var f=0,p=e.length;f<p;f++)q(e[f],c);else q(e,c);this.detach=function(){if(g)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,E,G,D=function(){if((E=b.offsetWidth)!=p||(G=b.offsetHeight)!=q)m=!0,p=E,q=G;g()},J=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};J(d,"scroll",D);J(f,"scroll",D)}var c=function(){GraphViewer.resizeSensorEnabled&&d()},f=Object.prototype.toString.call(e),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(g)for(var f=0,p=e.length;f<p;f++)q(e[f],c);else q(e,c);this.detach=function(){if(g)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
 b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
 (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 20263f026..9f1a0a3e8 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -6,11 +6,11 @@ if (workbox)
 	workbox.precaching.precacheAndRoute([
   {
     "url": "js/app.min.js",
-    "revision": "652e712b50d44d75ae6db155a439006a"
+    "revision": "1c47a0b7a4f9754e6cbc99c43bee74ce"
   },
   {
     "url": "js/extensions.min.js",
-    "revision": "363fe0bacb7a74a225020e90685808c6"
+    "revision": "bb9d0447bf1eaeac1791a8ac4097e3ca"
   },
   {
     "url": "js/stencils.min.js",
-- 
GitLab