From d83c0e1097a59ef19ff1aec12b1893c8d5f00877 Mon Sep 17 00:00:00 2001
From: Gaudenz Alder <gaudenz@jgraph.com>
Date: Tue, 15 Jan 2019 14:46:22 +0100
Subject: [PATCH] 10.0.39 release

---
 ChangeLog                                     |   4 +
 VERSION                                       |   2 +-
 src/main/webapp/cache.manifest                |   2 +-
 src/main/webapp/js/app.min.js                 |  20 +-
 src/main/webapp/js/atlas.min.js               | 816 +++++++++---------
 .../webapp/js/diagramly/DrawioFileSync.js     |  10 +-
 src/main/webapp/js/embed-static.min.js        |   2 +-
 src/main/webapp/js/reader.min.js              |   2 +-
 8 files changed, 431 insertions(+), 427 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 014a12796..e4ef720db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+15-JAN-2019: 10.0.39
+
+- Fixes shadow change check
+
 15-JAN-2019: 10.0.38
 
 - Fixes inconsistency in collaborative editing
diff --git a/VERSION b/VERSION
index ce01a4d71..faa1f27f6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-10.0.38
\ No newline at end of file
+10.0.39
\ No newline at end of file
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index fd684f613..aeb98d798 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 01/15/2019 09:41 AM
+# 01/15/2019 02:40 PM
 
 app.html
 index.html?offline=1
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 62b3a27f0..5aed0e8ab 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -7886,7 +7886,7 @@ this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.
 var ErrorDialog=function(a,c,b,d,f,h,l,m,p,g,k){p=null!=p?p:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,c);n.appendChild(q)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");
 b.style.marginTop="16px";b.style.textAlign="center";null!=h&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();h()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=k&&k()}),g.className="geBtn",b.appendChild(g));var t=mxUtils.button(d,function(){p&&a.hideDialog();null!=f&&f()});t.className="geBtn";b.appendChild(t);null!=l&&(d=mxUtils.button(l,function(){p&&a.hideDialog();null!=m&&m()}),d.className="geBtn gePrimaryBtn",
 b.appendChild(d));this.init=function(){t.focus()};n.appendChild(b);this.container=n};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,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="10.0.38";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,f){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,f);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,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="10.0.39";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,f){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,f);else if(EditorUi.enableLogging)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 g=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=k+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
 ":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};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(n){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
@@ -8258,19 +8258,19 @@ DrawioFileSync.prototype.handleMessageData=function(a){"desc"==a.a?this.file.sav
 DrawioFileSync.prototype.fileChangedNotify=function(){if(this.file.savingFile)this.remoteFileChanged=!0;else var a=this.fileChanged(mxUtils.bind(this,function(a){this.updateStatus()}),mxUtils.bind(this,function(a){this.file.handleFileError(a)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=a}))};
 DrawioFileSync.prototype.fileChanged=function(a,c,b){var d=window.setTimeout(mxUtils.bind(this,function(){this.ui.getCurrentFile()!=this.file||this.file.sync!=this?null!=c&&c():null!=b&&b()||this.file.loadPatchDescriptor(mxUtils.bind(this,function(d){this.catchup(this.file.getDescriptorEtag(d),this.file.getDescriptorSecret(d),a,c,b)}),c)}),0);return this.notifyThread=d};
 DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorEtag(a,this.file.getCurrentEtag()),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,c,b,d,f){var h=this.file.getCurrentEtag();if(h==a)null!=b&&b();else if(this.ui.getCurrentFile()!=this.file||this.file.sync!=this)null!=d&&d();else if(null==f||!f()){var l=0,m=!1,p=mxUtils.bind(this,function(){h==a?null!=b&&b():this.ui.getCurrentFile()!=this.file||this.file.sync!=this?null!=d&&d():null!=f&&f()||mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(h)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+
-encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;if(h==a)null!=b&&b();else if(this.ui.getCurrentFile()!=this.file||this.file.sync!=this)null!=d&&d();else if(null==f||!f()){var g=null,n=[],q=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var t=JSON.parse(c.getText());if(null!=t&&0<t.length)for(var u=0;u<t.length;u++){var w=this.stringToObject(t[u]);if(w.v>DrawioFileSync.PROTOCOL){m=!0;q=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&
-null!=w.d)g=w.d.checksum,q.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=g,n.push(JSON.stringify(w.d.details)));else{m=!0;q=[];break}}}catch(y){q=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,g,a,b,d,f,n)):l<=this.maxCacheReadyRetries&&!m&&401!=c.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(p,(l+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(b,d,f))}catch(y){null!=d&&d(y)}}}))});
-window.setTimeout(p,this.cacheReadyDelay)}};DrawioFileSync.prototype.reload=function(a,c,b,d){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!=c&&c(a)}),b,d)};
+DrawioFileSync.prototype.catchup=function(a,c,b,d,f){var h=this.file.getCurrentEtag();if(h==a)null!=b&&b();else if(this.ui.getCurrentFile()!=this.file||this.file.sync!=this)null!=d&&d();else if(null==f||!f()){var l=0,m=!1,p=mxUtils.bind(this,function(){h!=this.file.getCurrentEtag()?null!=b&&b():this.ui.getCurrentFile()!=this.file||this.file.sync!=this?null!=d&&d():null!=f&&f()||mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(h)+"&to="+encodeURIComponent(a)+
+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;if(h!=this.file.getCurrentEtag())null!=b&&b();else if(this.ui.getCurrentFile()!=this.file||this.file.sync!=this)null!=d&&d();else if(null==f||!f()){var g=null,n=[],q=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var t=JSON.parse(c.getText());if(null!=t&&0<t.length)for(var u=0;u<t.length;u++){var w=this.stringToObject(t[u]);if(w.v>DrawioFileSync.PROTOCOL){m=
+!0;q=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&null!=w.d)g=w.d.checksum,q.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=g,n.push(JSON.stringify(w.d.details)));else{m=!0;q=[];break}}}catch(y){q=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,g,a,b,d,f,n)):l<=this.maxCacheReadyRetries&&!m&&401!=c.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(p,(l+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+this.reload(b,d,f))}catch(y){null!=d&&d(y)}}}))});window.setTimeout(p,this.cacheReadyDelay)}};DrawioFileSync.prototype.reload=function(a,c,b,d){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!=c&&c(a)}),b,d)};
 DrawioFileSync.prototype.merge=function(a,c,b,d,f,h,l){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.checkShadow(this.file.shadowPages);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(!this.file.ignorePatches(a)){for(h=0;h<a.length;h++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[h]);h={};var m=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,h):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",l,h,"patches",a,"checksum",c==m,c);if(null!=c&&c!=m){var p=this.ui.hashValue(this.file.getCurrentEtag()),g=this.ui.hashValue(b);this.file.checksumError(f,a,"From: "+p+"\nTo: "+g+(null!=l&&0<l.length?"\nDetails: "+l.join(", "):"")+"\nChecksum: "+c+
-"\nCurrent: "+m+(null!=h?"\nCurrent Details: "+JSON.stringify(h):""),b);return}this.file.stats.lastMerge=l;this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=d&&d()}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=f&&f(k);try{this.file.sendErrorReport("Error in merge","Patches:\n"+this.file.compressReportData(JSON.stringify(a,
-null,2)),k)}catch(n){}}};
+a[h]);h={};var m=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,h):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",l,h,"patches",a,"checksum",c==m,c);if(null!=c&&c!=m){var p=this.ui.hashValue(this.file.getCurrentEtag()),g=this.ui.hashValue(b);h.inConflictState=this.file.inConflictState;h.invalidChecksum=this.file.invalidChecksum;this.file.checksumError(f,a,"From: "+
+p+"\nTo: "+g+(null!=l&&0<l.length?"\nDetails: "+l.join(", "):"")+"\nChecksum: "+c+"\nCurrent: "+m+(null!=h?"\nCurrent Details: "+JSON.stringify(h):""),b);return}this.file.stats.lastMerge=l;this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=d&&d()}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=f&&f(k);try{this.file.sendErrorReport("Error in merge",
+"Patches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),k)}catch(n){}}};
 DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),d=this.objectToString({});mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++}this.updateStatus()};
 DrawioFileSync.prototype.objectToString=function(a){a=this.ui.editor.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(this.ui.editor.graph.decompress(a))};
 DrawioFileSync.prototype.fileSaved=function(a,c,b,d){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.redirectDialogShowing&&(this.start(),null!=this.channelId)){var f=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),h={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};d=this.ui.getHashValueForPages(a,
-h);var l=this.ui.diffPages(f,a);h.lastChecksum=this.ui.getHashValueForPages(f);c=this.file.getDescriptorEtag(c);f=this.file.getCurrentEtag();h.from=this.ui.hashValue(c);h.to=this.ui.hashValue(f);var h=this.objectToString(this.createMessage({patch:l,checksum:d,details:h})),m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),p=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=h.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(m)+(null!=p?"&secret="+encodeURIComponent(p):"")+(h.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(h):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",f,h.length,"bytes","diff",l,"checksum",d)}this.file.shadowPages=a;null!=b&&b()};
+h);f=this.ui.diffPages(f,a);c=this.file.getDescriptorEtag(c);var l=this.file.getCurrentEtag();h.from=this.ui.hashValue(c);h.to=this.ui.hashValue(l);var h=this.objectToString(this.createMessage({patch:f,checksum:d,details:h})),m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),p=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=h.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+
+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(m)+(null!=p?"&secret="+encodeURIComponent(p):"")+(h.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(h):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",l,h.length,"bytes","diff",f,"checksum",d)}this.file.shadowPages=a;null!=b&&b()};
 DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
 DrawioFileSync.prototype.fileConflict=function(a,c,b){this.catchupRetryCount++;if(this.catchupRetryCount<this.maxCatchupRetries)if(this.file.stats.conflicts++,null!=a){var d=this.file.getDescriptorEtag(a);a=this.file.getDescriptorSecret(a);this.catchup(d,a,c,b)}else this.fileChanged(c,b);else this.catchupRetryCount=0,this.file.stats.timeouts++,null!=b&&b({message:mxResources.get("timeout")})};
 DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index a60daedf8..9c47e776b 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -7402,8 +7402,8 @@ DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this
 DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.inConflictState=!1;
 DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
 DrawioFile.prototype.updateFile=function(a,c,b,f){this.ui.getCurrentFile()!=this?null!=c&&c(e):null!=b&&b()||this.getLatestVersion(mxUtils.bind(this,function(h){try{this.ui.getCurrentFile()!=this?null!=c&&c(e):null!=b&&b()||(this.ui.getCurrentFile()==this?null!=h?this.mergeFile(h,a,c,f):this.reloadFile(a,c):null!=c&&c(e))}catch(k){null!=c&&c(k)}}),c)};
-DrawioFile.prototype.mergeFile=function(a,c,b,f){try{this.stats.fileMerged++;var h=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkShadow(h);this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(h,this.ui.pages):null;var k=[this.ui.diffPages(null!=f?f:h,this.shadowPages)];if(!this.ignorePatches(k)){var m=this.ui.patchPages(h,k[0]);f={};var t=
-this.ui.getHashValueForPages(m,f),h={},p=this.ui.getHashValueForPages(this.shadowPages,h);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",k,"checksum",p==t,t);if(null!=t&&t!=p){var d=this.compressReportData(this.getAnonymizedXmlForPages(m));this.checksumError(b,k,(null!=f?"Details: "+JSON.stringify(f):"")+"\nChecksum: "+t+"\nCurrent: "+p+(null!=h?"\nCurrent Details: "+JSON.stringify(h):"")+"\nPatched:\n"+d);return}this.patch(k,DrawioFile.LAST_WRITE_WINS?
+DrawioFile.prototype.mergeFile=function(a,c,b,f){try{this.stats.fileMerged++;var h=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkShadow(h);this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(h,this.ui.pages):null;var k=[this.ui.diffPages(null!=f?f:h,this.shadowPages)];if(!this.ignorePatches(k)){var m=this.ui.patchPages(h,k[0]);f={};var p=
+this.ui.getHashValueForPages(m,f),h={},t=this.ui.getHashValueForPages(this.shadowPages,h);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",k,"checksum",t==p,p);if(null!=p&&p!=t){var d=this.compressReportData(this.getAnonymizedXmlForPages(m));this.checksumError(b,k,(null!=f?"Details: "+JSON.stringify(f):"")+"\nChecksum: "+p+"\nCurrent: "+t+(null!=h?"\nCurrent Details: "+JSON.stringify(h):"")+"\nPatched:\n"+d);return}this.patch(k,DrawioFile.LAST_WRITE_WINS?
 this.backupPatch:null);this.checkPages()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(g){this.invalidChecksum=this.inConflictState=!0;null!=b&&b(g);try{this.sendErrorReport("Error in mergeFile",null,g)}catch(n){}}};
 DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var f=0;f<a.length;f++){var h=c.encode(new mxGraphModel(a[f].root));"1"!=urlParams.dev&&(h=this.ui.anonymizeNode(h));h.setAttribute("id",a[f].getId());a[f].viewState&&this.ui.editor.graph.saveViewState(a[f].viewState,h,!0);b.appendChild(h)}return mxUtils.getPrettyXml(b)};
 DrawioFile.prototype.checkPages=function(){this.ui.getCurrentFile()!=this||null!=this.ui.pages&&0!=this.ui.pages.length||this.sendErrorReport("Pages is null or empty","ShadowPages: "+(null!=this.shadowPages)+"\nShadowData: "+(null!=this.shadowData))};
@@ -7411,14 +7411,14 @@ DrawioFile.prototype.checkShadow=function(a){if(null==a||0==a.length){var c=null
 DrawioFile.prototype.compressReportData=function(a,c,b){null!=a&&a.length>(null!=c?c:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=b&&null!=a&&a.length>b&&(a=a.substring(0,b)+"[...]");return a};
 DrawioFile.prototype.checksumError=function(a,c,b,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var h=Error(),k=mxUtils.bind(this,function(a){var f=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
 25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+f+(null!=a?"\n\nRemote:\n"+a:""),h,7E4)});null==f?k(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==f?k(a):k(null)}),function(){})}catch(m){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,b,f){try{var h=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),k=this.getCurrentUser(),m=null!=k?this.ui.hashValue(k.id):"unknown",t=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var p=this.getTitle(),d=p.lastIndexOf("."),k="xml";0<d&&(k=p.substring(d));var g=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+
-" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+m+" ("+t+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nLocal:\n"+h+"\n\nStack:\n"+g,f)}catch(n){}};
+DrawioFile.prototype.sendErrorReport=function(a,c,b,f){try{var h=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),k=this.getCurrentUser(),m=null!=k?this.ui.hashValue(k.id):"unknown",p=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var t=this.getTitle(),d=t.lastIndexOf("."),k="xml";0<d&&(k=t.substring(d));var g=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+
+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+m+" ("+p+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nLocal:\n"+h+"\n\nStack:\n"+g,f)}catch(n){}};
 DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),k=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(k,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)}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}catch(f){null!=c&&c(f)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
 DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,b=0;b<a.length&&c;b++)c=c&&0==Object.keys(a[b]).length;return c};
-DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,f=b.history.slice(),h=b.indexOfNextAdd,k=this.ui.editor.graph;k.container.style.visibility="hidden";var m=this.changeListenerEnabled;this.changeListenerEnabled=!1;var t=k.foldingEnabled,p=k.mathEnabled,d=k.cellRenderer.redraw;k.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());d.apply(this,arguments)};k.model.beginUpdate();try{for(var g=
-0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{k.model.endUpdate();k.container.style.visibility="";k.cellRenderer.redraw=d;this.changeListenerEnabled=m;b.history=f;b.indexOfNextAdd=h;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)p!=
-k.mathEnabled?(this.ui.editor.updateGraphComponents(),k.refresh()):(t!=k.foldingEnabled?k.view.revalidate():k.view.validate(),k.sizeDidChange()),null!=this.ui.format&&k.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
+DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,f=b.history.slice(),h=b.indexOfNextAdd,k=this.ui.editor.graph;k.container.style.visibility="hidden";var m=this.changeListenerEnabled;this.changeListenerEnabled=!1;var p=k.foldingEnabled,t=k.mathEnabled,d=k.cellRenderer.redraw;k.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());d.apply(this,arguments)};k.model.beginUpdate();try{for(var g=
+0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{k.model.endUpdate();k.container.style.visibility="";k.cellRenderer.redraw=d;this.changeListenerEnabled=m;b.history=f;b.indexOfNextAdd=h;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)t!=
+k.mathEnabled?(this.ui.editor.updateGraphComponents(),k.refresh()):(p!=k.foldingEnabled?k.view.revalidate():k.view.validate(),k.sizeDidChange()),null!=this.ui.format&&k.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
 DrawioFile.prototype.save=function(a,c,b,f,h,k){if(this.isEditable())if(!h&&this.invalidChecksum)if(null!=b)b({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave();else if(null!=b)b({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};
 DrawioFile.prototype.saveAs=function(a,c,b){};DrawioFile.prototype.saveFile=function(a,c,b,f){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};
 DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,b){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,c,b){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
@@ -7465,19 +7465,19 @@ StorageFile.prototype.saveFile=function(a,c,b,f){if(this.isEditable()){var h=mxU
 StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.getLatestVersion=function(a,c){this.ui.getLocalData(this.title,mxUtils.bind(this,function(b){a(new StorageFile(this.ui,b,this.title))}))};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,c,b){StorageFile.call(this,a,c,b)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
 StorageLibrary.prototype.isRenamable=function(a,c,b){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,c,b){StorageFile.call(this,a,c,b);a=b;c=a.lastIndexOf("/");0<=c&&(a=a.substring(c+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,c,b){return!1};UrlLibrary.prototype.saveAs=function(a,c,b){};UrlLibrary.prototype.open=function(){};/*
  mxClient.IS_IOS || */
-var StorageDialog=function(a,c,b){function f(q,f,l,u,A,v){function w(){mxEvent.addListener(x,"click",null!=v?v:function(){l!=App.MODE_GOOGLE||a.isDriveDomain()?l==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(l,d.checked);c()})):(a.setMode(l,d.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
+var StorageDialog=function(a,c,b){function f(q,f,l,u,z,v){function w(){mxEvent.addListener(x,"click",null!=v?v:function(){l!=App.MODE_GOOGLE||a.isDriveDomain()?l==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(l,d.checked);c()})):(a.setMode(l,d.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
 mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",f);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var E=document.createElement("div");E.style.textOverflow="ellipsis";E.style.overflow="hidden";if(null!=q){var h=document.createElement("img");
-h.setAttribute("src",q);h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";x.appendChild(h)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(E.style.paddingTop="0px",E.style.marginTop="-2px");x.appendChild(E);mxUtils.write(E,f);if(null!=A)for(q=0;q<A.length;q++)mxUtils.br(E),mxUtils.write(E,A[q]);if(null!=u&&null==a[u]){h.style.visibility=
+h.setAttribute("src",q);h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";x.appendChild(h)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(E.style.paddingTop="0px",E.style.marginTop="-2px");x.appendChild(E);mxUtils.write(E,f);if(null!=z)for(q=0;q<z.length;q++)mxUtils.br(E),mxUtils.write(E,z[q]);if(null!=u&&null==a[u]){h.style.visibility=
 "hidden";mxUtils.setOpacity(E,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(x);var y=window.setTimeout(function(){null==a[u]&&(k.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[u]&&(window.clearTimeout(y),mxUtils.setOpacity(E,100),h.style.visibility="",k.stop(),w(),"drive"==u&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else w();
-p.appendChild(x);++g>=b&&(mxUtils.br(p),g=0)}b=null!=b?b:2;var h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";h.style.paddingTop="0px";h.style.paddingBottom="20px";var k=a.addLanguageMenu(h,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
-"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16px";m.style.width="16px";m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";k.appendChild(m);mxUtils.write(k,mxResources.get("help"));h.appendChild(k)}var t=document.createElement("div");t.style.position=
-"absolute";t.style.cursor="pointer";t.style.fontSize="12px";t.style.bottom="28px";t.style.color="gray";mxUtils.write(t,mxResources.get("decideLater"));a.isOfflineApp()?t.style.right="20px":(mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,0)"),t.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)t.style.marginLeft=-Math.round(t.clientWidth/2)+"px"};h.appendChild(t);mxEvent.addListener(t,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;
-a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var p=document.createElement("div");mxClient.IS_QUIRKS&&(p.style.whiteSpace="nowrap",p.style.cssFloat="left");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";p.style.padding="12px 0px 12px 0px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;var g=0,n=document.createElement("p"),k=document.createElement("p");
+t.appendChild(x);++g>=b&&(mxUtils.br(t),g=0)}b=null!=b?b:2;var h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";h.style.paddingTop="0px";h.style.paddingBottom="20px";var k=a.addLanguageMenu(h,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
+"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16px";m.style.width="16px";m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";k.appendChild(m);mxUtils.write(k,mxResources.get("help"));h.appendChild(k)}var p=document.createElement("div");p.style.position=
+"absolute";p.style.cursor="pointer";p.style.fontSize="12px";p.style.bottom="28px";p.style.color="gray";mxUtils.write(p,mxResources.get("decideLater"));a.isOfflineApp()?p.style.right="20px":(mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0)"),p.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)p.style.marginLeft=-Math.round(p.clientWidth/2)+"px"};h.appendChild(p);mxEvent.addListener(p,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;
+a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var t=document.createElement("div");mxClient.IS_QUIRKS&&(t.style.whiteSpace="nowrap",t.style.cssFloat="left");t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";t.style.padding="12px 0px 12px 0px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;var g=0,n=document.createElement("p"),k=document.createElement("p");
 k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");h.appendChild(k);"function"===typeof window.DriveClient&&f(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");f(IMAGE_PATH+"/osa_drive-harddisk.png",
-mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||f(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);h.appendChild(p);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(d);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));k.appendChild(m);mxUtils.br(k);var q=a.getRecent();if(null!=q&&
+mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||f(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);h.appendChild(t);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(d);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));k.appendChild(m);mxUtils.br(k);var q=a.getRecent();if(null!=q&&
 0<q.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var v=document.createElement("option");v.setAttribute("value","");v.setAttribute("selected","selected");v.style.textAlign="center";mxUtils.write(v,mxResources.get("openRecent")+"...");u.appendChild(v);for(v=0;v<q.length;v++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var d=document.createElement("option");d.setAttribute("value",a.id);mxUtils.write(d,
-a.title+" ("+mxResources.get(b)+")");u.appendChild(d)})(q[v]);k.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else k.style.marginTop="20px",p.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
-", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),k.appendChild(q),p.style.paddingBottom="4px");p.appendChild(k);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
+a.title+" ("+mxResources.get(b)+")");u.appendChild(d)})(q[v]);k.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else k.style.marginTop="20px",t.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),k.appendChild(q),t.style.paddingBottom="4px");t.appendChild(k);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
 document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",h.appendChild(n))},5E3);this.container=
 h},SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";a.addLanguageMenu(c,!0);var b=null,b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position="absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom="22px";b.style.left="26px";b.style.color=
 "gray";var f=document.createElement("img");mxUtils.setOpacity(f,50);f.style.height="16px";f.style.width="16px";f.setAttribute("border","0");f.setAttribute("valign","bottom");f.setAttribute("src",Editor.helpImage);f.style.marginRight="2px";b.appendChild(f);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";f=document.createElement("img");f.setAttribute("border",
@@ -7489,259 +7489,259 @@ b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?b=mxResources.get("github"
 m.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});k.appendChild(c)},f=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=f?(m.style.marginBottom="24px",h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="inline-block",h.style.marginTop="6px",mxUtils.write(h,mxResources.get("changeUser")+" ("+f.displayName+")"),m.style.marginBottom="16px",
 k.style.paddingBottom="18px",mxEvent.addListener(h,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),k.appendChild(h)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?h(function(){a.oneDrive.logout()}):
 a.mode==App.MODE_GITHUB&&null!=a.gitHub?h(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&h(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&h(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(k),h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="inline-block",h.style.marginTop="8px",mxUtils.write(h,mxResources.get("notUsingService",
-[b])),mxEvent.addListener(h,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),k.appendChild(h));c.appendChild(k);this.container=c},ConfirmDialog=function(a,c,b,f,h,k,m,t,p){var d=document.createElement("div");d.style.textAlign="center";var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight="44px";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,c);d.appendChild(g);g=document.createElement("div");g.style.textAlign=
-"center";g.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f(n.checked)});k.className="geBtn";null!=t&&(k.innerHTML=t+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&g.appendChild(k);var q=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(n.checked)});g.appendChild(q);
-null!=m?(q.innerHTML=m+"<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||g.appendChild(k);d.appendChild(g);p?(g.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),g.appendChild(h),d.appendChild(g),mxEvent.addListener(h,
+[b])),mxEvent.addListener(h,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),k.appendChild(h));c.appendChild(k);this.container=c},ConfirmDialog=function(a,c,b,f,h,k,m,p,t){var d=document.createElement("div");d.style.textAlign="center";var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight="44px";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,c);d.appendChild(g);g=document.createElement("div");g.style.textAlign=
+"center";g.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f(n.checked)});k.className="geBtn";null!=p&&(k.innerHTML=p+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&g.appendChild(k);var q=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(n.checked)});g.appendChild(q);
+null!=m?(q.innerHTML=m+"<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||g.appendChild(k);d.appendChild(g);t?(g.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),g.appendChild(h),d.appendChild(g),mxEvent.addListener(h,
 "click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):g.style.marginTop="16px";this.init=function(){q.focus()};this.container=d},EmbedDialog=function(a,c,b,f,h,k){f=document.createElement("div");var m=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=k?mxUtils.write(f,k):mxUtils.write(f,mxResources.get(5E5>c.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(f);k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";
-mxUtils.write(k,a.formatFileSize(c.length));f.appendChild(k);var t=document.createElement("textarea");t.setAttribute("autocomplete","off");t.setAttribute("autocorrect","off");t.setAttribute("autocapitalize","off");t.setAttribute("spellcheck","false");t.style.marginTop="10px";t.style.resize="none";t.style.height="150px";t.style.width="440px";t.style.border="1px solid gray";t.value=mxResources.get("updatingDocument");f.appendChild(t);mxUtils.br(f);this.init=function(){window.setTimeout(function(){5E5>
-c.length?(t.value=c,t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)):(t.setAttribute("readonly","true"),t.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||
-9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var d=5E5>c.length?t.value:c;if(null!=h)h(d);else if(m)try{var g=a.openLink(d);null!=g&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=d.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=
-window.open().document;f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");f.close()}}),p.className="geBtn",k.appendChild(p));if(!m||7500<c.length){var d=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});d.className="geBtn";k.appendChild(d)}if(m&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var g=mxUtils.button("",function(){try{var b=
-"https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(t.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img");d.setAttribute("src",Editor.facebookImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");g.appendChild(d);g.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth=
-"46px";g.className="geBtn";k.appendChild(g)}7168>c.length&&(g=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(t.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom=
-"5px",g.appendChild(d),g.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",k.appendChild(g))}d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(d);g=mxUtils.button(mxResources.get("copy"),function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,
-null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?d.className="geBtn gePrimaryBtn":(k.appendChild(g),g.className="geBtn gePrimaryBtn",d.className="geBtn"):(k.appendChild(p),d.className="geBtn",p.className="geBtn gePrimaryBtn");f.appendChild(k);this.container=f};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,c){function b(){var a=null!=z&&null!=z.getTitle()?z.getTitle():this.defaultFilename;if(E.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(A.checked?"1":"0");
-b+="&resize="+(x.checked?"1":"0");b+="&x0="+Number(g.value);b+="&y0="+p;h.mathEnabled&&(b+="&math=1");l.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=b}else z.constructor==DriveFile||z.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=z.getHash().substring(1),b=z.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
-a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(g.value),b+="&height="+a),d.value=b):d.value=""}var f=document.createElement("div"),h=a.editor.graph,k=h.getGraphBounds(),m=h.view.scale,t=Math.floor(k.x/m-h.view.translate.x),p=Math.floor(k.y/m-h.view.translate.y);mxUtils.write(f,mxResources.get("googleGadget")+":");mxUtils.br(f);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
-f.appendChild(d);mxUtils.br(f);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(f,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=t;f.appendChild(g);mxUtils.write(f,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
+mxUtils.write(k,a.formatFileSize(c.length));f.appendChild(k);var p=document.createElement("textarea");p.setAttribute("autocomplete","off");p.setAttribute("autocorrect","off");p.setAttribute("autocapitalize","off");p.setAttribute("spellcheck","false");p.style.marginTop="10px";p.style.resize="none";p.style.height="150px";p.style.width="440px";p.style.border="1px solid gray";p.value=mxResources.get("updatingDocument");f.appendChild(p);mxUtils.br(f);this.init=function(){window.setTimeout(function(){5E5>
+c.length?(p.value=c,p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var t=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||
+9<document.documentMode))||(t=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var d=5E5>c.length?p.value:c;if(null!=h)h(d);else if(m)try{var g=a.openLink(d);null!=g&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=d.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=
+window.open().document;f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");f.close()}}),t.className="geBtn",k.appendChild(t));if(!m||7500<c.length){var d=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});d.className="geBtn";k.appendChild(d)}if(m&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var g=mxUtils.button("",function(){try{var b=
+"https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img");d.setAttribute("src",Editor.facebookImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");g.appendChild(d);g.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth=
+"46px";g.className="geBtn";k.appendChild(g)}7168>c.length&&(g=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(p.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom=
+"5px",g.appendChild(d),g.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",k.appendChild(g))}d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(d);g=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,
+null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?d.className="geBtn gePrimaryBtn":(k.appendChild(g),g.className="geBtn gePrimaryBtn",d.className="geBtn"):(k.appendChild(t),d.className="geBtn",t.className="geBtn gePrimaryBtn");f.appendChild(k);this.container=f};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,c){function b(){var a=null!=A&&null!=A.getTitle()?A.getTitle():this.defaultFilename;if(E.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<C.length&&(b+="&s="+C);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(z.checked?"1":"0");
+b+="&resize="+(x.checked?"1":"0");b+="&x0="+Number(g.value);b+="&y0="+t;h.mathEnabled&&(b+="&math=1");l.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(g.value),b+="&height="+a),d.value=b):d.value=""}var f=document.createElement("div"),h=a.editor.graph,k=h.getGraphBounds(),m=h.view.scale,p=Math.floor(k.x/m-h.view.translate.x),t=Math.floor(k.y/m-h.view.translate.y);mxUtils.write(f,mxResources.get("googleGadget")+":");mxUtils.br(f);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
+f.appendChild(d);mxUtils.br(f);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(f,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=p;f.appendChild(g);mxUtils.write(f,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
 "text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(k.height/m);f.appendChild(n);mxUtils.br(f);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";f.appendChild(k);mxUtils.write(f,mxResources.get("publicDiagramUrl")+":");mxUtils.br(f);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=c||"";
 f.appendChild(q);mxUtils.br(f);mxUtils.write(f,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";f.appendChild(u);mxUtils.br(f);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";f.appendChild(v);mxUtils.write(f,mxResources.get("pan")+" ");var w=document.createElement("input");
 w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";f.appendChild(w);mxUtils.write(f,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);f.appendChild(y);mxUtils.write(f,mxResources.get("edit")+" ");var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginLeft="8px";f.appendChild(l);mxUtils.write(f,
-mxResources.get("asNew")+" ");mxUtils.br(f);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";f.appendChild(x);mxUtils.write(f,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";f.appendChild(A);mxUtils.write(f,mxResources.get("fit")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft=
-"8px";f.appendChild(E);mxUtils.write(f,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),z=a.getCurrentFile();mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(A,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(E,"change",b);mxEvent.addListener(n,"change",b);mxEvent.addListener(g,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(q,"change",b);b();
+mxResources.get("asNew")+" ");mxUtils.br(f);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";f.appendChild(x);mxUtils.write(f,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";f.appendChild(z);mxUtils.write(f,mxResources.get("fit")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft=
+"8px";f.appendChild(E);mxUtils.write(f,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(E,"change",b);mxEvent.addListener(n,"change",b);mxEvent.addListener(g,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(q,"change",b);b();
 mxEvent.addListener(d,"click",function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";k.appendChild(m);f.appendChild(k);this.container=f},CreateGraphDialog=function(a,c,b){var f=document.createElement("div");f.style.textAlign=
 "right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);f.appendChild(c);var k=new Graph(c);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";k.cellRenderer.installCellOverlayListeners=
 function(a,b,d){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(d.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(d){b.fireEvent(new mxEventObject("pointerdown","event",d,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(d.node,"touchstart",function(d){b.fireEvent(new mxEventObject("pointerdown","event",d,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
-!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var t=k.getDefaultParent(),p=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){k.connectionHandler.reset();k.clearSelection();var g=k.getCellGeometry(a),l;n(function(){l=k.insertVertex(t,null,"Entry",g.x,g.y,80,30,"rounded=1;");p(l);k.view.refresh(l);
-k.insertEdge(t,null,"",a,l,m)},function(){k.scrollCellToVisible(l)})});b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),g=b.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var l=mxUtils.convertPoint(k.container,mxEvent.getClientX(d),mxEvent.getClientY(d));k.connectionHandler.start(g,l.x,l.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});k.addCellOverlay(a,b)});k.getModel().beginUpdate();var d;try{d=k.insertVertex(t,null,"Start",
-0,0,80,30,"ellipse"),p(d)}finally{k.getModel().endUpdate()}var g;"horizontalTree"==b?(g=new mxCompactTreeLayout(k),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(g=new mxCompactTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(g=new mxRadialTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==b?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var p=k.getDefaultParent(),t=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){k.connectionHandler.reset();k.clearSelection();var g=k.getCellGeometry(a),l;n(function(){l=k.insertVertex(p,null,"Entry",g.x,g.y,80,30,"rounded=1;");t(l);k.view.refresh(l);
+k.insertEdge(p,null,"",a,l,m)},function(){k.scrollCellToVisible(l)})});b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),g=b.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var l=mxUtils.convertPoint(k.container,mxEvent.getClientX(d),mxEvent.getClientY(d));k.connectionHandler.start(g,l.x,l.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});k.addCellOverlay(a,b)});k.getModel().beginUpdate();var d;try{d=k.insertVertex(p,null,"Start",
+0,0,80,30,"ellipse"),t(d)}finally{k.getModel().endUpdate()}var g;"horizontalTree"==b?(g=new mxCompactTreeLayout(k),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(g=new mxCompactTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(g=new mxRadialTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==b?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
 b?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==b?(g=new mxFastOrganicLayout(k,!1),g.forceConstant=80):"circle"==b&&(g=new mxCircleLayout(k));if(null!=g){var n=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),g.execute(k.getDefaultParent(),d)}catch(x){throw x;}finally{var l=new mxMorphing(k);l.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));l.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
 function(a,b,d,g,c){q.apply(this,arguments);n()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(k.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&f.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
 var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),b.x,b.y),d=a.editor.graph.view,g=d.getBounds(b);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(k.destroy(),c.parentNode.removeChild(c));a.hideDialog()});f.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(u)};this.container=f};
 CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
 IMAGE_PATH+"/handle-connect.png",26,26);
 var BackgroundImageDialog=function(a,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var f=document.createElement("h2");mxUtils.write(f,mxResources.get("backgroundImage"));f.style.marginTop="0px";b.appendChild(f);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var f=a.editor.graph.backgroundImage,h=document.createElement("input");h.setAttribute("type","text");h.style.marginTop="4px";h.style.marginBottom="4px";h.style.width="350px";h.value=
-null!=f?f.src:"";var k=!1,m=function(){k||""==h.value||a.isOffline()?(t.value="",p.value=""):a.loadImage(mxUtils.trim(h.value),function(a){t.value=a.width;p.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));h.value="";t.value="";p.value=""})};this.init=function(){h.focus();if(Graph.fileSupport){h.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=b.parentNode,g=null;mxEvent.addListener(d,"dragleave",function(a){null!=
+null!=f?f.src:"";var k=!1,m=function(){k||""==h.value||a.isOffline()?(p.value="",t.value=""):a.loadImage(mxUtils.trim(h.value),function(a){p.value=a.width;t.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));h.value="";p.value="";t.value=""})};this.init=function(){h.focus();if(Graph.fileSupport){h.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=b.parentNode,g=null;mxEvent.addListener(d,"dragleave",function(a){null!=
 g&&(g.parentNode.removeChild(g),g=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==g&&(!mxClient.IS_IE||10<document.documentMode)&&(g=a.highlightElement(d));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=g&&(g.parentNode.removeChild(g),g=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,d,g,n,c){h.value=a;m()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(h.value=decodeURIComponent(d),m())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(h);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var t=document.createElement("input");
-t.setAttribute("type","text");t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="16px";t.value=null!=f?f.width:"";b.appendChild(t);mxUtils.write(b,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=f?f.height:"";b.appendChild(p);f=mxUtils.button(mxResources.get("reset"),function(){h.value="";t.value="";p.value="";k=!1});mxEvent.addListener(f,"mousedown",
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(h.value=decodeURIComponent(d),m())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(h);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var p=document.createElement("input");
+p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=f?f.width:"";b.appendChild(p);mxUtils.write(b,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="16px";t.value=null!=f?f.height:"";b.appendChild(t);f=mxUtils.button(mxResources.get("reset"),function(){h.value="";p.value="";t.value="";k=!1});mxEvent.addListener(f,"mousedown",
 function(){k=!0});mxEvent.addListener(f,"touchstart",function(){k=!0});f.className="geBtn";f.width="100";b.appendChild(f);mxUtils.br(b);mxEvent.addListener(h,"change",m);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&&(h.value=a.url,m()));h.focus()};f=document.createElement("div");f.style.marginTop="40px";f.style.textAlign="right";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
 d.className="geBtn";a.editor.cancelFirst&&f.appendChild(d);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var g=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
 g.className="geBtn";f.appendChild(g);null!=a.drive&&"1"==urlParams.photos&&(g=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),g.className="geBtn",f.appendChild(g))}g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=h.value?new mxImage(mxUtils.trim(h.value),t.value,p.value):null)});g.className="geBtn gePrimaryBtn";f.appendChild(g);a.editor.cancelFirst||f.appendChild(d);b.appendChild(f);this.container=b},ParseDialog=function(a,c,b){function f(b,d){var g=b.split("\n");if("plantUmlPng"==d||"plantUmlSvg"==
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),g.className="geBtn",f.appendChild(g))}g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=h.value?new mxImage(mxUtils.trim(h.value),p.value,t.value):null)});g.className="geBtn gePrimaryBtn";f.appendChild(g);a.editor.cancelFirst||f.appendChild(d);b.appendChild(f);this.container=b},ParseDialog=function(a,c,b){function f(b,d){var g=b.split("\n");if("plantUmlPng"==d||"plantUmlSvg"==
 d||"plantUmlTxt"==d){var g="plantUmlTxt"==d?PLANT_URL+"/txt/":"plantUmlPng"==d?PLANT_URL+"/png/":PLANT_URL+"/svg/",c=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var n=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},l=function(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=n(c1&63);r+=n(c2&63);r+=n(c3&63);return r+=
-n(c4&63)},q=new XMLHttpRequest;q.open("GET",g+function(a){r="";for(z=0;z<a.length;z+=3)r=z+2==a.length?r+l(a.charCodeAt(z),a.charCodeAt(z+1),0):z+1==a.length?r+l(a.charCodeAt(z),0,0):r+l(a.charCodeAt(z),a.charCodeAt(z+1),a.charCodeAt(z+2));return r}(c.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=d&&(q.responseType="blob");q.onload=function(g){if(200<=this.status&&300>this.status)if("plantUmlTxt"==d)a.spinner.stop(),c.setSelectionCell(a.insertAsPreText(this.response,
+n(c4&63)},q=new XMLHttpRequest;q.open("GET",g+function(a){r="";for(m=0;m<a.length;m+=3)r=m+2==a.length?r+l(a.charCodeAt(m),a.charCodeAt(m+1),0):m+1==a.length?r+l(a.charCodeAt(m),0,0):r+l(a.charCodeAt(m),a.charCodeAt(m+1),a.charCodeAt(m+2));return r}(c.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=d&&(q.responseType="blob");q.onload=function(g){if(200<=this.status&&300>this.status)if("plantUmlTxt"==d)a.spinner.stop(),c.setSelectionCell(a.insertAsPreText(this.response,
 k.x,k.y)),c.scrollCellToVisible(c.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response);l.onloadend=function(d){var g=new Image;g.onload=function(){a.spinner.stop();var d=g.width,n=g.height;if(0==d&&0==n){var q=l.result,f=q.indexOf(","),q=decodeURIComponent(escape(atob(q.substring(f+1)))),q=mxUtils.parseXml(q).getElementsByTagName("svg");0<q.length&&(d=parseFloat(q[0].getAttribute("width")),n=parseFloat(q[0].getAttribute("height")))}c.getModel().beginUpdate();try{cell=c.insertVertex(null,
-null,b,k.x,k.y,d,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+";")}finally{c.getModel().endUpdate()}c.setSelectionCell(cell);c.scrollCellToVisible(c.getSelectionCell())};g.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(g)};q.onerror=function(b){a.handleError(b)};q.send()}}else if("table"==d){for(var f=null,u=[],h=0,z=0;z<g.length;z++)if(q=mxUtils.trim(g[z]),"create table"==q.substring(0,12).toLowerCase())q=
+null,b,k.x,k.y,d,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+";")}finally{c.getModel().endUpdate()}c.setSelectionCell(cell);c.scrollCellToVisible(c.getSelectionCell())};g.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(g)};q.onerror=function(b){a.handleError(b)};q.send()}}else if("table"==d){for(var f=null,u=[],h=0,m=0;m<g.length;m++)if(q=mxUtils.trim(g[m]),"create table"==q.substring(0,12).toLowerCase())q=
 mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=q.substring(0,q.lastIndexOf(" "))),f=new mxCell(q,new mxGeometry(h,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),f.vertex=!0,u.push(f),q=a.editor.graph.getPreferredSizeForCell(t),null!=q&&(f.geometry.width=q.width+10);else if(null!=f&&")"==q.charAt(0))h+=f.geometry.width+
-40,f=null;else if("("!=q&&null!=f&&(q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length),"primary key"!=q.substring(0,11).toLowerCase())){var m=q.toLowerCase().indexOf("primary key"),q=q.replace(/primary key/i,""),t=new mxCell(q,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;q=sb.cloneCell(t,0<m?"PK":"");q.connectable=!1;q.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;";q.geometry.width=30;q.geometry.height=26;t.insert(q);q=a.editor.graph.getPreferredSizeForCell(t);null!=q&&f.geometry.width<q.width+10&&(f.geometry.width=Math.min(220,q.width+10));f.insert(t);f.geometry.height+=26}0<u.length&&(c=a.editor.graph,g=c.view,
+40,f=null;else if("("!=q&&null!=f&&(q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length),"primary key"!=q.substring(0,11).toLowerCase())){var p=q.toLowerCase().indexOf("primary key"),q=q.replace(/primary key/i,""),t=new mxCell(q,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;q=sb.cloneCell(t,0<p?"PK":"");q.connectable=!1;q.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;";q.geometry.width=30;q.geometry.height=26;t.insert(q);q=a.editor.graph.getPreferredSizeForCell(t);null!=q&&f.geometry.width<q.width+10&&(f.geometry.width=Math.min(220,q.width+10));f.insert(t);f.geometry.height+=26}0<u.length&&(c=a.editor.graph,g=c.view,
 q=c.getGraphBounds(),c.setSelectionCells(c.importCells(u,Math.ceil(Math.max(0,q.x/g.scale-g.translate.x)+4*c.gridSize),Math.ceil(Math.max(0,(q.y+q.height)/g.scale-g.translate.y)+4*c.gridSize))),c.scrollCellToVisible(c.getSelectionCell()))}else if("list"==d){if(0<g.length){c=a.editor.graph;f=new mxCell(g[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-f.vertex=!0;q=c.getPreferredSizeForCell(f);null!=q&&f.geometry.width<q.width+10&&(f.geometry.width=q.width+10);t=[f];if(1<g.length)for(z=1;z<g.length;z++)"--"==g[z]?(q=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;"),q.vertex=!0,f.geometry.height+=q.geometry.height,f.insert(q),t.push(q)):0<g[z].length&&";"!=g[z].charAt(0)&&(h=new mxCell(g[z],
+f.vertex=!0;q=c.getPreferredSizeForCell(f);null!=q&&f.geometry.width<q.width+10&&(f.geometry.width=q.width+10);t=[f];if(1<g.length)for(m=1;m<g.length;m++)"--"==g[m]?(q=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;"),q.vertex=!0,f.geometry.height+=q.geometry.height,f.insert(q),t.push(q)):0<g[m].length&&";"!=g[m].charAt(0)&&(h=new mxCell(g[m],
 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;"),h.vertex=!0,q=c.getPreferredSizeForCell(h),null!=q&&h.geometry.width<q.width&&(h.geometry.width=q.width),f.geometry.width=Math.max(f.geometry.width,h.geometry.width),f.geometry.height+=h.geometry.height,f.insert(h),t.push(h));c.getModel().beginUpdate();try{f=c.importCells([f],k.x,k.y)[0],c.fireEvent(new mxEventObject("cellsInserted",
-"cells",[f].concat(f.children)))}finally{c.getModel().endUpdate()}c.setSelectionCell(f);c.scrollCellToVisible(c.getSelectionCell())}}else{for(var t=function(a){var b=p[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,p[a]=b,u.push(b));return b},p={},u=[],z=0;z<g.length;z++)if(";"!=g[z].charAt(0)){var I=g[z].split("->");if(2<=I.length){var m=t(I[0]),C=t(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;m.insertEdge(I,!0);C.insertEdge(I,
-!1);u.push(I)}}if(0<u.length){g=document.createElement("div");g.style.visibility="hidden";document.body.appendChild(g);c=new Graph(g);c.getModel().beginUpdate();try{u=c.importCells(u);for(z=0;z<u.length;z++)c.getModel().isVertex(u[z])&&(q=c.getPreferredSizeForCell(u[z]),u[z].geometry.width=Math.max(u[z].geometry.width,q.width),u[z].geometry.height=Math.max(u[z].geometry.height,q.height));f=new mxFastOrganicLayout(c);f.disableEdgeStyle=!1;f.forceConstant=120;f.execute(c.getDefaultParent());h=new mxParallelEdgeLayout(c);
+"cells",[f].concat(f.children)))}finally{c.getModel().endUpdate()}c.setSelectionCell(f);c.scrollCellToVisible(c.getSelectionCell())}}else{for(var t=function(a){var b=F[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,F[a]=b,u.push(b));return b},F={},u=[],m=0;m<g.length;m++)if(";"!=g[m].charAt(0)){var I=g[m].split("->");if(2<=I.length){var p=t(I[0]),B=t(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;p.insertEdge(I,!0);B.insertEdge(I,
+!1);u.push(I)}}if(0<u.length){g=document.createElement("div");g.style.visibility="hidden";document.body.appendChild(g);c=new Graph(g);c.getModel().beginUpdate();try{u=c.importCells(u);for(m=0;m<u.length;m++)c.getModel().isVertex(u[m])&&(q=c.getPreferredSizeForCell(u[m]),u[m].geometry.width=Math.max(u[m].geometry.width,q.width),u[m].geometry.height=Math.max(u[m].geometry.height,q.height));f=new mxFastOrganicLayout(c);f.disableEdgeStyle=!1;f.forceConstant=120;f.execute(c.getDefaultParent());h=new mxParallelEdgeLayout(c);
 h.spacing=20;h.execute(c.getDefaultParent())}finally{c.getModel().endUpdate()}c.clearCellOverlays();t=[];a.editor.graph.getModel().beginUpdate();try{t=a.editor.graph.importCells(c.getModel().getChildren(c.getDefaultParent()),k.x,k.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",t))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(t);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());c.destroy();g.parentNode.removeChild(g)}}}function h(){return"list"==
-t.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"table"==t.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"==t.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
-"plantUmlSvg"==t.value||"plantUmlTxt"==t.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var k=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height=
-"354px";m.style.marginBottom="16px";var t=document.createElement("select");"formatSql"==b&&(t.style.display="none");var p=document.createElement("option");p.setAttribute("value","list");mxUtils.write(p,mxResources.get("list"));"plantUml"!=b&&t.appendChild(p);null!=b&&"fromText"!=b||p.setAttribute("selected","selected");p=document.createElement("option");p.setAttribute("value","table");mxUtils.write(p,mxResources.get("formatSql"));"formatSql"==b&&(t.appendChild(p),p.setAttribute("selected","selected"));
-p=document.createElement("option");p.setAttribute("value","diagram");mxUtils.write(p,mxResources.get("diagram"));"plantUml"!=b&&t.appendChild(p);p=document.createElement("option");p.setAttribute("value","plantUmlSvg");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&p.setAttribute("selected","selected");var d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
-")");var g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(t.appendChild(p),t.appendChild(d),t.appendChild(g));var n=h();m.value=n;c.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.addEventListener("drop",function(a){a.stopPropagation();
-a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){m.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(t);mxEvent.addListener(t,"change",function(){var a=h();if(0==m.value.length||m.value==n)n=a,m.value=n});b=mxUtils.button(mxResources.get("close"),function(){m.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);p=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();f(m.value,t.value)});c.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,f,h,k,m,t,p,d,g,n,q,u,v,w){function y(){var a=!0;if(null!=S)for(;H<S.length&&(a||0!=mxUtils.mod(H,30));)a=S[H++],A(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function l(){if(Z)b||a.hideDialog(),u(Z,aa,D.value);else if(f)b||a.hideDialog(),f(V,D.value);else{var d=D.value;
-null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,V,null!=R&&0<R.length?R:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,d,g,l){null!=Y&&(Y.style.backgroundColor="transparent",Y.style.border="1px solid transparent");C.removeAttribute("disabled");V=b;R=d;Y=a;Z=g;aa=l;Y.style.backgroundColor=t;Y.style.border=p}function A(b,d,g,c,n,q,f,u,A){var w=document.createElement("div");w.className="geTemplate";
-w.style.height=M+"px";w.style.width=X+"px";null!=c&&0<c.length&&w.setAttribute("title",c);if(null!=q)w.style.backgroundImage="url("+q+")",w.style.backgroundSize="contain",w.style.backgroundPosition="center center",w.style.backgroundRepeat="no-repeat",mxEvent.addListener(w,"click",function(a){x(w,null,null,b,f)}),mxEvent.addListener(w,"dblclick",function(a){l()});else if(null!=b&&0<b.length){g=A||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";w.style.backgroundImage="url("+g+")";w.style.backgroundPosition=
-"center center";w.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(w,"click",function(g){C.setAttribute("disabled","disabled");w.style.backgroundColor="transparent";w.style.border="1px solid transparent";g=b;g=/^https?:\/\//.test(g)&&!a.isCorsEnabledForUrl(g)?PROXY_URL+"?url="+encodeURIComponent(g):TEMPLATE_PATH+"/"+g;I.spin(O);mxUtils.get(g,mxUtils.bind(this,function(a){I.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(w,a.getText(),d),v&&l())}))});mxEvent.addListener(w,"dblclick",
+p.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"table"==p.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"==p.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
+"plantUmlSvg"==p.value||"plantUmlTxt"==p.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var k=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height=
+"354px";m.style.marginBottom="16px";var p=document.createElement("select");"formatSql"==b&&(p.style.display="none");var t=document.createElement("option");t.setAttribute("value","list");mxUtils.write(t,mxResources.get("list"));"plantUml"!=b&&p.appendChild(t);null!=b&&"fromText"!=b||t.setAttribute("selected","selected");t=document.createElement("option");t.setAttribute("value","table");mxUtils.write(t,mxResources.get("formatSql"));"formatSql"==b&&(p.appendChild(t),t.setAttribute("selected","selected"));
+t=document.createElement("option");t.setAttribute("value","diagram");mxUtils.write(t,mxResources.get("diagram"));"plantUml"!=b&&p.appendChild(t);t=document.createElement("option");t.setAttribute("value","plantUmlSvg");mxUtils.write(t,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&t.setAttribute("selected","selected");var d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
+")");var g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(p.appendChild(t),p.appendChild(d),p.appendChild(g));var n=h();m.value=n;c.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.addEventListener("drop",function(a){a.stopPropagation();
+a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){m.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(p);mxEvent.addListener(p,"change",function(){var a=h();if(0==m.value.length||m.value==n)n=a,m.value=n});b=mxUtils.button(mxResources.get("close"),function(){m.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);t=mxUtils.button(mxResources.get("insert"),
+function(){a.hideDialog();f(m.value,p.value)});c.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,f,h,k,m,p,t,d,g,n,q,u,v,w){function y(){var a=!0;if(null!=S)for(;F<S.length&&(a||0!=mxUtils.mod(F,30));)a=S[F++],z(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function l(){if(Z)b||a.hideDialog(),u(Z,aa,D.value);else if(f)b||a.hideDialog(),f(V,D.value);else{var d=D.value;
+null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,V,null!=R&&0<R.length?R:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,d,g,l){null!=Y&&(Y.style.backgroundColor="transparent",Y.style.border="1px solid transparent");B.removeAttribute("disabled");V=b;R=d;Y=a;Z=g;aa=l;Y.style.backgroundColor=p;Y.style.border=t}function z(b,d,g,c,n,q,f,u,z){var w=document.createElement("div");w.className="geTemplate";
+w.style.height=M+"px";w.style.width=X+"px";null!=c&&0<c.length&&w.setAttribute("title",c);if(null!=q)w.style.backgroundImage="url("+q+")",w.style.backgroundSize="contain",w.style.backgroundPosition="center center",w.style.backgroundRepeat="no-repeat",mxEvent.addListener(w,"click",function(a){x(w,null,null,b,f)}),mxEvent.addListener(w,"dblclick",function(a){l()});else if(null!=b&&0<b.length){g=z||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";w.style.backgroundImage="url("+g+")";w.style.backgroundPosition=
+"center center";w.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(w,"click",function(g){B.setAttribute("disabled","disabled");w.style.backgroundColor="transparent";w.style.border="1px solid transparent";g=b;g=/^https?:\/\//.test(g)&&!a.isCorsEnabledForUrl(g)?PROXY_URL+"?url="+encodeURIComponent(g):TEMPLATE_PATH+"/"+g;I.spin(O);mxUtils.get(g,mxUtils.bind(this,function(a){I.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(w,a.getText(),d),v&&l())}))});mxEvent.addListener(w,"dblclick",
 function(a){v=!0})}else w.innerHTML='<table width="100%" height="100%" style="line-height:1em;"><tr><td align="center" valign="middle">'+mxResources.get(g)+"</td></tr></table>",n&&x(w),null!=u?mxEvent.addListener(w,"click",u):(mxEvent.addListener(w,"click",function(a){x(w)}),mxEvent.addListener(w,"dblclick",function(a){l()}));O.appendChild(w)}function E(){mxEvent.addListener(O,"scroll",function(a){O.scrollTop+O.clientHeight>=O.scrollHeight&&(y(),mxEvent.consume(a))});var a=null,b;for(b in P){var g=
 document.createElement("div"),l=mxResources.get(b),c=P[b];null==l&&(l=b.substring(0,1).toUpperCase()+b.substring(1));18<l.length&&(l=l.substring(0,18)+"&hellip;");g.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";g.setAttribute("title",l+" ("+c.length+")");mxUtils.write(g,g.getAttribute("title"));null!=d&&(g.style.padding=d);Q.appendChild(g);null==a&&(a=g,a.style.backgroundColor=m);(function(b,d){mxEvent.addListener(g,
-"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=m,O.scrollTop=0,O.innerHTML="",H=0,S=P[b],J=null,y())})})(b,g)}y()}b=null!=b?b:!0;h=null!=h?h:!1;m=null!=m?m:"#ebf2f9";t=null!=t?t:"#e6eff8";p=null!=p?p:"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var B=document.createElement("div");B.style.height="100%";var z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="46px";b&&B.appendChild(z);var G=document.createElement("img");G.setAttribute("border",
-"0");G.setAttribute("align","absmiddle");G.style.width="40px";G.style.height="40px";G.style.marginRight="10px";G.style.paddingBottom="4px";G.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
-!c&&b&&z.appendChild(G);b&&mxUtils.write(z,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");G=".xml";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_TRELLO&&null!=a.trello&&(G=a.trello.extension);var D=
-document.createElement("input");D.setAttribute("value",a.defaultFilename+G);D.style.marginRight="20px";D.style.marginLeft="10px";D.style.width=c?"220px":"430px";this.init=function(){b&&(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?D.select():document.execCommand("selectAll",!1,null))};b&&z.appendChild(D);var z=!1,H=0,I=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),C=mxUtils.button(w||
-mxResources.get("create"),function(){C.setAttribute("disabled","disabled");l();C.removeAttribute("disabled")});C.className="geBtn gePrimaryBtn";if(n||q){var F=[],J=null,N=function(a){C.setAttribute("disabled","disabled");for(var b=0;b<F.length;b++)F[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},z=!0;w=document.createElement("div");w.style.whiteSpace="nowrap";w.style.height="30px";B.appendChild(w);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";O.style.left=
-"160px";N(0);O.scrollTop=0;O.innerHTML="";H=0;J!=S&&(S=J,y(),J=null)});F.push(G);w.appendChild(G);var L=function(a){Q.style.display="none";O.style.left="30px";N(a?-1:1);null==J&&(J=S);O.scrollTop=0;O.innerHTML="";I.spin(O);H=0;var b=function(a,b){I.stop();S=a;b?O.innerHTML=b:0==a.length?O.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(O.innerHTML="",y())};a?q(T.value,b):n(b)};n&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),w.appendChild(G),F.push(G));
-if(q){G=document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxResources.get("search")+":";w.appendChild(G);var T=document.createElement("input");T.style.marginRight="10px";T.style.marginLeft="10px";T.style.width="220px";mxEvent.addListener(T,"keypress",function(a){13==a.keyCode&&L(!0)});w.appendChild(T);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";w.appendChild(G)}N(0)}var R=null,V=null,Y=null,Z=null,aa=null,O=document.createElement("div");O.style.border=
-"1px solid #d3d3d3";O.style.position="absolute";O.style.left="160px";O.style.right="34px";z=(b?72:40)+(z?30:0);O.style.top=z+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var M=140,X=140,P={},U=1;P.basic=[{title:"blankDiagram",select:!0}];var S=P.basic;if(!c){B.appendChild(Q);
-B.appendChild(O);var ba=!1;/^https?:\/\//.test(g)&&!a.isCorsEnabledForUrl(g)&&(g=PROXY_URL+"?url="+encodeURIComponent(g));mxUtils.get(g,function(a){if(!ba){ba=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=a.getAttribute("section");null==d&&(d=b.indexOf("/"),d=b.substring(0,d));b=P[d];null==b&&(U++,b=[],P[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
-tooltip:a.getAttribute("url"),preview:a.getAttribute("preview")})}}a=a.nextSibling}E()}})}mxEvent.addListener(D,"keypress",function(b){a.dialog.container.firstChild==B&&13==b.keyCode&&l()});g=document.createElement("div");g.style.marginTop=c?"4px":"16px";g.style.textAlign="right";g.style.position="absolute";g.style.left="40px";g.style.bottom="24px";g.style.right="40px";z=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});z.className="geBtn";!a.editor.cancelFirst||
-h&&null==k||g.appendChild(z);c||a.isOffline()||!b||null!=f||h||(w=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),w.className="geBtn",g.appendChild(w));c||"1"==urlParams.embed||h||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(D.value)+
+"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=m,O.scrollTop=0,O.innerHTML="",F=0,S=P[b],J=null,y())})})(b,g)}y()}b=null!=b?b:!0;h=null!=h?h:!1;m=null!=m?m:"#ebf2f9";p=null!=p?p:"#e6eff8";t=null!=t?t:"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var C=document.createElement("div");C.style.height="100%";var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="46px";b&&C.appendChild(A);var H=document.createElement("img");H.setAttribute("border",
+"0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
+!c&&b&&A.appendChild(H);b&&mxUtils.write(A,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?H=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?H=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?H=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?H=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(H=a.trello.extension);var D=
+document.createElement("input");D.setAttribute("value",a.defaultFilename+H);D.style.marginRight="20px";D.style.marginLeft="10px";D.style.width=c?"220px":"430px";this.init=function(){b&&(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?D.select():document.execCommand("selectAll",!1,null))};b&&A.appendChild(D);var A=!1,F=0,I=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}),B=mxUtils.button(w||
+mxResources.get("create"),function(){B.setAttribute("disabled","disabled");l();B.removeAttribute("disabled")});B.className="geBtn gePrimaryBtn";if(n||q){var G=[],J=null,N=function(a){B.setAttribute("disabled","disabled");for(var b=0;b<G.length;b++)G[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},A=!0;w=document.createElement("div");w.style.whiteSpace="nowrap";w.style.height="30px";C.appendChild(w);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";O.style.left=
+"160px";N(0);O.scrollTop=0;O.innerHTML="";F=0;J!=S&&(S=J,y(),J=null)});G.push(H);w.appendChild(H);var L=function(a){Q.style.display="none";O.style.left="30px";N(a?-1:1);null==J&&(J=S);O.scrollTop=0;O.innerHTML="";I.spin(O);F=0;var b=function(a,b){I.stop();S=a;b?O.innerHTML=b:0==a.length?O.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(O.innerHTML="",y())};a?q(T.value,b):n(b)};n&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),w.appendChild(H),G.push(H));
+if(q){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxResources.get("search")+":";w.appendChild(H);var T=document.createElement("input");T.style.marginRight="10px";T.style.marginLeft="10px";T.style.width="220px";mxEvent.addListener(T,"keypress",function(a){13==a.keyCode&&L(!0)});w.appendChild(T);H=mxUtils.button(mxResources.get("search"),function(){L(!0)});H.className="geBtn";w.appendChild(H)}N(0)}var R=null,V=null,Y=null,Z=null,aa=null,O=document.createElement("div");O.style.border=
+"1px solid #d3d3d3";O.style.position="absolute";O.style.left="160px";O.style.right="34px";A=(b?72:40)+(A?30:0);O.style.top=A+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var M=140,X=140,P={},U=1;P.basic=[{title:"blankDiagram",select:!0}];var S=P.basic;if(!c){C.appendChild(Q);
+C.appendChild(O);var ba=!1;/^https?:\/\//.test(g)&&!a.isCorsEnabledForUrl(g)&&(g=PROXY_URL+"?url="+encodeURIComponent(g));mxUtils.get(g,function(a){if(!ba){ba=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=a.getAttribute("section");null==d&&(d=b.indexOf("/"),d=b.substring(0,d));b=P[d];null==b&&(U++,b=[],P[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
+tooltip:a.getAttribute("url"),preview:a.getAttribute("preview")})}}a=a.nextSibling}E()}})}mxEvent.addListener(D,"keypress",function(b){a.dialog.container.firstChild==C&&13==b.keyCode&&l()});g=document.createElement("div");g.style.marginTop=c?"4px":"16px";g.style.textAlign="right";g.style.position="absolute";g.style.left="40px";g.style.bottom="24px";g.style.right="40px";A=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});A.className="geBtn";!a.editor.cancelFirst||
+h&&null==k||g.appendChild(A);c||a.isOffline()||!b||null!=f||h||(w=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),w.className="geBtn",g.appendChild(w));c||"1"==urlParams.embed||h||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(D.value)+
 "&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",g.appendChild(c));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(d){a.openFiles(b.files,!0)});b.click()}),v.className="geBtn",
-g.appendChild(v));g.appendChild(C);a.editor.cancelFirst||null!=f||h&&null==k||g.appendChild(z);B.appendChild(g);this.container=B},CreateDialog=function(a,c,b,f,h,k,m,t,p,d,g,n,q,u,v){function w(b,d,g,l){function q(){mxEvent.addListener(f,"click",function(){var b=g;if(m){var d=x.value,l=d.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:B.value,n="";b==App.MODE_GOOGLE?n=a.drive.extension:b==App.MODE_GITHUB?n=a.gitHub.extension:b==App.MODE_TRELLO?n=a.trello.extension:b==App.MODE_DROPBOX?
+g.appendChild(v));g.appendChild(B);a.editor.cancelFirst||null!=f||h&&null==k||g.appendChild(A);C.appendChild(g);this.container=C},CreateDialog=function(a,c,b,f,h,k,m,p,t,d,g,n,q,u,v){function w(b,d,g,l){function q(){mxEvent.addListener(f,"click",function(){var b=g;if(m){var d=x.value,l=d.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:C.value,n="";b==App.MODE_GOOGLE?n=a.drive.extension:b==App.MODE_GITHUB?n=a.gitHub.extension:b==App.MODE_TRELLO?n=a.trello.extension:b==App.MODE_DROPBOX?
 n=a.dropbox.extension:b==App.MODE_ONEDRIVE?n=a.oneDrive.extension:b==App.MODE_DEVICE&&(n=".xml");0<=l&&(d=d.substring(0,l));x.value=d+n}}y(g)})}var f=document.createElement("a");f.style.overflow="hidden";var u=document.createElement("img");u.src=b;u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.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(u);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var w=document.createElement("div");f.appendChild(w);mxUtils.write(w,d);if(null!=l&&null==a[l]){u.style.visibility="hidden";mxUtils.setOpacity(w,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 h=window.setTimeout(function(){null==
-a[l]&&(v.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(h),mxUtils.setOpacity(w,100),u.style.visibility="",v.stop(),q())}))}else q();A.appendChild(f);++E==n&&(mxUtils.br(A),E=0)}function y(d){var g=x.value;if(null==d||null!=g&&0<g.length)a.hideDialog(),b(g,d)}m=null!=m?m:!0;t=null!=t?t:!0;n=null!=n?n:4;k=document.createElement("div");null==f&&a.addLanguageMenu(k);var l=document.createElement("h2");mxUtils.write(l,h||
+a[l]&&(v.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(h),mxUtils.setOpacity(w,100),u.style.visibility="",v.stop(),q())}))}else q();z.appendChild(f);++E==n&&(mxUtils.br(z),E=0)}function y(d){var g=x.value;if(null==d||null!=g&&0<g.length)a.hideDialog(),b(g,d)}m=null!=m?m:!0;p=null!=p?p:!0;n=null!=n?n:4;k=document.createElement("div");null==f&&a.addLanguageMenu(k);var l=document.createElement("h2");mxUtils.write(l,h||
 mxResources.get("create"));l.style.marginTop="0px";l.style.marginBottom="24px";k.appendChild(l);mxUtils.write(k,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",c);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};k.appendChild(x);null!=q&&null!=u&&"image/"==u.substring(0,
 6)&&(x.style.width="160px",h=null,"image/svg+xml"==u&&mxClient.IS_SVG?(h=document.createElement("div"),h.innerHTML=mxUtils.trim(q),q=h.getElementsByTagName("svg")[0],u=parseInt(q.getAttribute("width")),v=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+u+" "+v),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(h=document.createElement("img"),h.setAttribute("src","data:"+u+(v?";base64,":";utf8,")+q)),h.style.position="absolute",h.style.top="70px",h.style.right="100px",
-h.style.maxWidth="120px",h.style.maxHeight="80px",mxUtils.setPrefixedStyle(h.style,"transform","translate(50%,-50%)"),k.appendChild(h),p&&Editor.popupsAllowed&&(h.style.cursor="pointer",mxEvent.addListener(h,"click",function(){y("_blank")})));mxUtils.br(k);var A=document.createElement("div");A.style.textAlign="center";var E=0;A.style.marginTop="6px";k.appendChild(A);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&
-(q=document.createElement("option"),q.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),B.appendChild(q),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),B.appendChild(q),a.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",
-mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),B.appendChild(q),a.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),
-B.appendChild(q),w(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),B.appendChild(q),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,
-mxResources.get("device")),B.appendChild(q),a.mode!=App.MODE_DEVICE&&t||q.setAttribute("selected","selected"),g&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));t&&isLocalStorage&&"0"!=urlParams.browser&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_BROWSER),mxUtils.write(t,mxResources.get("browser")),B.appendChild(t),a.mode==App.MODE_BROWSER&&t.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),
-App.MODE_BROWSER));t=document.createElement("div");t.style.marginTop="26px";t.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(d)}),g.className="geBtn",t.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=f?f():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&t.appendChild(g);null==f&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),
-q.className="geBtn",t.appendChild(q));p&&Editor.popupsAllowed&&(p=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),p.className="geBtn",t.appendChild(p));a.editor.cancelFirst||t.appendChild(g);mxEvent.addListener(x,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});k.appendChild(t);this.container=k},PopupDialog=function(a,c,b,f,h){h=null!=h?h:!0;var k=document.createElement("div");k.style.textAlign="left";
-mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=f&&f()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";k.appendChild(m);mxUtils.br(k);var t=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=b&&b();a.openLink(c,null,!0)});t.className="geBtn gePrimaryBtn";t.style.width=m.style.width;k.appendChild(t);mxUtils.br(k);mxUtils.br(k);
-mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,c,b,f,h,k){k=null!=k?k:!0;var m=a.editor.graph,t=document.createElement("div");mxUtils.write(t,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("value",
-b);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",
-mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){p.value="";p.focus()});c.appendChild(p);c.appendChild(b);t.appendChild(c);var d=function(b,d,g,c){var l="data:"==b.substring(0,5);!a.isOffline()||l&&"undefined"===typeof chrome?
+h.style.maxWidth="120px",h.style.maxHeight="80px",mxUtils.setPrefixedStyle(h.style,"transform","translate(50%,-50%)"),k.appendChild(h),t&&Editor.popupsAllowed&&(h.style.cursor="pointer",mxEvent.addListener(h,"click",function(){y("_blank")})));mxUtils.br(k);var z=document.createElement("div");z.style.textAlign="center";var E=0;z.style.marginTop="6px";k.appendChild(z);var C=document.createElement("select");C.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&
+(q=document.createElement("option"),q.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),C.appendChild(q),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),C.appendChild(q),a.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",
+mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),C.appendChild(q),a.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),
+C.appendChild(q),w(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),C.appendChild(q),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,
+mxResources.get("device")),C.appendChild(q),a.mode!=App.MODE_DEVICE&&p||q.setAttribute("selected","selected"),g&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));p&&isLocalStorage&&"0"!=urlParams.browser&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_BROWSER),mxUtils.write(p,mxResources.get("browser")),C.appendChild(p),a.mode==App.MODE_BROWSER&&p.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),
+App.MODE_BROWSER));p=document.createElement("div");p.style.marginTop="26px";p.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(d)}),g.className="geBtn",p.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=f?f():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&p.appendChild(g);null==f&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),
+q.className="geBtn",p.appendChild(q));t&&Editor.popupsAllowed&&(t=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),t.className="geBtn",p.appendChild(t));a.editor.cancelFirst||p.appendChild(g);mxEvent.addListener(x,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});k.appendChild(p);this.container=k},PopupDialog=function(a,c,b,f,h){h=null!=h?h:!0;var k=document.createElement("div");k.style.textAlign="left";
+mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=f&&f()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";k.appendChild(m);mxUtils.br(k);var p=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=b&&b();a.openLink(c,null,!0)});p.className="geBtn gePrimaryBtn";p.style.width=m.style.width;k.appendChild(p);mxUtils.br(k);mxUtils.br(k);
+mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,c,b,f,h,k){k=null!=k?k:!0;var m=a.editor.graph,p=document.createElement("div");mxUtils.write(p,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var t=document.createElement("input");t.setAttribute("value",
+b);t.setAttribute("type","text");t.setAttribute("spellcheck","false");t.setAttribute("autocorrect","off");t.setAttribute("autocomplete","off");t.setAttribute("autocapitalize","off");t.style.marginTop="6px";t.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";t.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";t.style.backgroundRepeat="no-repeat";t.style.backgroundPosition="100% 50%";t.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",
+mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){t.value="";t.focus()});c.appendChild(t);c.appendChild(b);p.appendChild(c);var d=function(b,d,g,c){var l="data:"==b.substring(0,5);!a.isOffline()||l&&"undefined"===typeof chrome?
 0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(l){a.spinner.stop();a.hideDialog();var n=!1===c?1:null!=d&&null!=g?Math.max(d/l.width,g/l.height):Math.min(1,Math.min(520/l.width,520/l.height));k&&(b=a.convertDataUri(b));f(b,Math.round(Number(l.width)*n),Math.round(Number(l.height)*n))},function(){a.spinner.stop();f(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),f(b)):(b=a.convertDataUri(b),
-d=null==d?120:d,g=null==g?100:g,a.hideDialog(),f(b,d,g))},g=function(b,g){if(null!=b){var c=h?null:m.getModel().getGeometry(m.getSelectionCell());null!=c?d(b,c.width,c.height,g):d(b,null,null,g)}else a.hideDialog(),f(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=t.parentNode,d=null;mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,
+d=null==d?120:d,g=null==g?100:g,a.hideDialog(),f(b,d,g))},g=function(b,g){if(null!=b){var c=h?null:m.getModel().getGeometry(m.getSelectionCell());null!=c?d(b,c.width,c.height,g):d(b,null,null,g)}else a.hideDialog(),f(null)};this.init=function(){t.focus();if(Graph.fileSupport){t.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=p.parentNode,d=null;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(g){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(b));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,d,c,n,q,f,u){g(a,u)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));
 else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(c)&&g(decodeURIComponent(c))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);ImageDialog.filePicked=
-function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(p.value=a.url));p.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,d,l,c,n){g(a)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){n.click()});q.className="geBtn";b.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==p.value.substring(0,11)&&"data:image/svg"!=p.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,p.value,function(a){p.value=a});a.showDialog(b.container,200,185,!0,!0);b.init()}),q.className="geBtn",b.appendChild(q));"undefined"!=
+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&&(t.value=a.url));t.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,d,l,c,n){g(a)},function(){},function(a){return"image/"==a.type.substring(0,
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){n.click()});q.className="geBtn";b.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==t.value.substring(0,11)&&"data:image/svg"!=t.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,t.value,function(a){t.value=a});a.showDialog(b.container,200,185,!0,!0);b.init()}),q.className="geBtn",b.appendChild(q));"undefined"!=
 typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),q.className="geBtn",b.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&
 (q=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),
-q.className="geBtn",b.appendChild(q)));mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&g(p.value)});q=mxUtils.button(mxResources.get("apply"),function(){g(p.value)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.backgroundPosition="center 65%",t.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position=
-"absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),t.appendChild(c));t.appendChild(b);this.container=t},LinkDialog=function(a,c,b,f,h){function k(a,b,d){d=mxUtils.button("",d);d.className="geBtn";d.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);d.style.minWidth="42px";d.style.verticalAlign="middle";
-d.appendChild(b);y.appendChild(d)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var t=document.createElement("div");t.className="geTitle";t.style.backgroundColor="transparent";t.style.borderColor="transparent";t.style.whiteSpace="nowrap";t.style.textOverflow="clip";t.style.cursor="default";mxClient.IS_VML||(t.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("dragUrlsHere"));p.setAttribute("type","text");
-p.style.marginTop="6px";p.style.width="440px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?
-0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){p.value="";p.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");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 q=document.createElement("select");q.style.width="420px";if(h&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(p.setAttribute("value",c),g.setAttribute("checked","checked"),g.defaultChecked=!0);p.style.width="420px";t.appendChild(g);t.appendChild(p);t.appendChild(d);mxUtils.br(t);t.appendChild(n);h=!1;for(d=0;d<a.pages.length;d++){var u=document.createElement("option");mxUtils.write(u,a.pages[d].getName()||
+q.className="geBtn",b.appendChild(q)));mxEvent.addListener(t,"keypress",function(a){13==a.keyCode&&g(t.value)});q=mxUtils.button(mxResources.get("apply"),function(){g(t.value)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.backgroundPosition="center 65%",p.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position=
+"absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),p.appendChild(c));p.appendChild(b);this.container=p},LinkDialog=function(a,c,b,f,h){function k(a,b,d){d=mxUtils.button("",d);d.className="geBtn";d.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);d.style.minWidth="42px";d.style.verticalAlign="middle";
+d.appendChild(b);y.appendChild(d)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var p=document.createElement("div");p.className="geTitle";p.style.backgroundColor="transparent";p.style.borderColor="transparent";p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";mxClient.IS_VML||(p.style.paddingRight="20px");var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("dragUrlsHere"));t.setAttribute("type","text");
+t.style.marginTop="6px";t.style.width="440px";t.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";t.style.backgroundRepeat="no-repeat";t.style.backgroundPosition="100% 50%";t.style.paddingRight="14px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?
+0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){t.value="";t.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");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 q=document.createElement("select");q.style.width="420px";if(h&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(t.setAttribute("value",c),g.setAttribute("checked","checked"),g.defaultChecked=!0);t.style.width="420px";p.appendChild(g);p.appendChild(t);p.appendChild(d);mxUtils.br(p);p.appendChild(n);h=!1;for(d=0;d<a.pages.length;d++){var u=document.createElement("option");mxUtils.write(u,a.pages[d].getName()||
 mxResources.get("pageWithNumber",[d+1]));u.setAttribute("value","data:page/id,"+a.pages[d].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),h=!0);q.appendChild(u)}if(!h&&n.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");q.appendChild(v);mxEvent.addListener(q,"change",function(){null==v.parentNode||v.selected||
-v.parentNode.removeChild(v)})}t.appendChild(q)}else p.setAttribute("value",c),t.appendChild(p),t.appendChild(d);m.appendChild(t);var w=mxUtils.button(b,function(){a.hideDialog();f(n.checked?"pageNotFound"!==q.value?q.value:c:p.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null));
-mxEvent.addListener(q,"focus",function(){g.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var b=m.parentNode,d=null;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(g){null==d&&(!mxClient.IS_IE||
-10<document.documentMode)&&(d=a.highlightElement(b));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign=
-"right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&y.appendChild(b);t=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});t.style.verticalAlign="middle";t.className="geBtn";y.appendChild(t);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=
-a.docs;var b=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)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);p.value=b;p.focus()}else LinkDialog.selectedDocs=null;p.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),
+v.parentNode.removeChild(v)})}p.appendChild(q)}else t.setAttribute("value",c),p.appendChild(t),p.appendChild(d);m.appendChild(p);var w=mxUtils.button(b,function(){a.hideDialog();f(n.checked?"pageNotFound"!==q.value?q.value:c:t.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null));
+mxEvent.addListener(q,"focus",function(){g.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(t,"focus",function(){n.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var b=m.parentNode,d=null;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(g){null==d&&(!mxClient.IS_IE||
+10<document.documentMode)&&(d=a.highlightElement(b));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(t.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign=
+"right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&y.appendChild(b);p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});p.style.verticalAlign="middle";p.className="geBtn";y.appendChild(p);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=
+a.docs;var b=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)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);t.value=b;t.focus()}else LinkDialog.selectedDocs=null;t.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),
 function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
 b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(d).addView(g).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){p.value=a[0].link;p.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){p.value=b.value[0].webUrl;
-p.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],d=a[1],g=a[2];a=a.slice(3,a.length).join("/");p.value="https://github.com/"+b+"/"+d+"/blob/"+g+"/"+a;p.focus()}})});mxEvent.addListener(p,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),f(n.checked?q.value:p.value,LinkDialog.selectedDocs))});y.appendChild(w);a.editor.cancelFirst||y.appendChild(b);m.appendChild(y);this.container=
+a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){t.value=a[0].link;t.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){t.value=b.value[0].webUrl;
+t.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],d=a[1],g=a[2];a=a.slice(3,a.length).join("/");t.value="https://github.com/"+b+"/"+d+"/blob/"+g+"/"+a;t.focus()}})});mxEvent.addListener(t,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),f(n.checked?q.value:t.value,LinkDialog.selectedDocs))});y.appendChild(w);a.editor.cancelFirst||y.appendChild(b);m.appendChild(y);this.container=
 m},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var b=document.createElement("img");b.style.border="0px";mxClient.IS_SVG?(b.setAttribute("width","164"),b.setAttribute("height","221"),b.style.width="164px",b.style.height="221px",b.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(b.setAttribute("width","176"),b.setAttribute("height","219"),b.style.width="170px",b.style.height="219px",b.setAttribute("src",IMAGE_PATH+
 "/logo-flat.png"));"dark"==uiTheme&&(b.style.filter="grayscale(100%) invert(100%)");c.appendChild(b);mxUtils.br(c);var b="dark"==uiTheme?"#cccccc":"#505050",f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color=b;c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color=b;f.innerHTML='&copy; 2005-2019 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,
 "click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),b=document.createElement("div");mxUtils.write(b,mxResources.get("sendYourFeedbackToDrawIo"));b.style.fontSize="18px";b.style.marginBottom="18px";c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(b);var f=document.createElement("input");f.setAttribute("type",
-"text");f.style.marginTop="6px";f.style.width="600px";var h=mxUtils.button(mxResources.get("sendMessage"),function(){var b=p.value+(m.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.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(f.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
+"text");f.style.marginTop="6px";f.style.width="600px";var h=mxUtils.button(mxResources.get("sendMessage"),function(){var b=t.value+(m.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.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(f.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
 "&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});h.className="geBtn gePrimaryBtn";h.setAttribute("disabled","disabled");var k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
 mxEvent.addListener(f,"change",function(){0<f.value.length&&0<k.test(f.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});mxEvent.addListener(f,"keyup",function(){0<f.value.length&&k.test(f.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});c.appendChild(f);this.init=function(){f.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;b=document.createElement("p");b.style.marginTop=
-"14px";b.appendChild(m);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(t);mxEvent.addListener(t,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("feedback"));c.appendChild(b);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("commentsNotes"));
-c.appendChild(p);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst?(b.appendChild(t),b.appendChild(h)):(b.appendChild(h),b.appendChild(t));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+"14px";b.appendChild(m);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(p);mxEvent.addListener(p,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("feedback"));c.appendChild(b);var t=document.createElement("textarea");t.style.resize="none";t.style.width="600px";t.style.height="140px";t.style.marginTop="6px";t.setAttribute("placeholder",mxResources.get("commentsNotes"));
+c.appendChild(t);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst?(b.appendChild(p),b.appendChild(h)):(b.appendChild(h),b.appendChild(p));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
 var RevisionDialog=function(a,c,b){var f=document.createElement("div"),h=document.createElement("h3");h.style.marginTop="0px";mxUtils.write(h,mxResources.get("revisionHistory"));f.appendChild(h);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";f.appendChild(k);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height=
-"376px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);f.appendChild(m);var t=new Graph(m);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!0);t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var p=0,d=null,g=0,n=t.getGlobalVariable;t.getGlobalVariable=function(a){return"page"==a&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==a?g+1:n.apply(this,arguments)};t.getLinkForCell=function(){return null};
-Editor.MathJaxRender&&t.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){a.editor.graph.mathEnabled&&Editor.MathJaxRender(t.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,w=null,y=null,l=null,x=mxUtils.button("",function(){null!=y&&t.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",
-mxResources.get("zoomIn"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var A=mxUtils.button("",function(){null!=y&&t.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var E=mxUtils.button("",function(){null!=y&&(t.maxFitScale=8,t.fit(8),
-t.center())});E.className="geSprite geSprite-fit";E.setAttribute("title",mxResources.get("fit"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var B=mxUtils.button("",function(){null!=y&&(t.zoomActual(),t.center())});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");
-mxUtils.setOpacity(B,20);var z=document.createElement("div");z.style.position="absolute";z.style.textAlign="right";z.style.color="gray";z.style.marginTop="10px";z.style.backgroundColor="transparent";z.style.top="440px";z.style.right="32px";z.style.maxWidth="380px";z.style.cursor="default";var G=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,d=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?
-a.saveLocalFile(d,b,"text/xml"):(d="undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(a.editor.graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=l&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(l):a.spinner.spin(document.body,mxResources.get("restoring"))&&
-u.save(!0,function(b){a.spinner.stop();a.replaceFileData(l);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});D.className="geBtn";D.setAttribute("disabled","disabled");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var I=null;mxEvent.addListener(H,
-"change",function(a){null!=I&&(I(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("open"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});C.className="geBtn";C.setAttribute("disabled","disabled");null!=b&&(C.style.display="none");var F=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl(H.selectedIndex))});F.className="geBtn gePrimaryBtn";
-F.setAttribute("disabled","disabled");null!=b&&(F.style.display="none",D.className="geBtn gePrimaryBtn");h=document.createElement("div");h.style.position="absolute";h.style.top="482px";h.style.width="640px";h.style.textAlign="right";var J=document.createElement("div");J.className="geToolbarContainer";J.style.backgroundColor="transparent";J.style.padding="2px";J.style.border="none";J.style.left="199px";J.style.top="442px";var N=null;if(null!=c&&0<c.length){m.style.cursor="move";var L=document.createElement("table");
-L.style.border="1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var T=document.createElement("tbody"),R=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var V=c.length-1;0<=V;V--){var Y=function(b){var n=new Date(b.modifiedDate),f=null;if(0<=n.getTime()){var h=function(c){q.stop();var w=mxUtils.parseXml(c),v=a.editor.extractGraphModel(w.documentElement,!0);if(null!=v){var h=function(b){null!=
-b&&(b=k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},k=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";m.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,t.getModel());t.maxFitScale=1;t.fit(8);t.center();return a};H.style.display="none";H.innerHTML="";y=w;l=c;d=parseSelectFunction=null;g=0;if("mxfile"==v.nodeName){w=v.getElementsByTagName("diagram");d=[];for(c=0;c<w.length;c++)d.push(w[c]);
-g=Math.min(p,d.length-1);0<d.length&&h(d[g]);if(1<d.length)for(H.removeAttribute("disabled"),H.style.display="",c=0;c<d.length;c++)w=document.createElement("option"),mxUtils.write(w,d[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),w.setAttribute("value",c),c==g&&w.setAttribute("selected","selected"),H.appendChild(w);I=function(){g=p=parseInt(H.value);h(d[p])}}else k(v);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");z.innerHTML="";mxUtils.write(z,(null!=
-c?c+" ":"")+n.toLocaleDateString()+" "+n.toLocaleTimeString());z.setAttribute("title",f.getAttribute("title"));x.removeAttribute("disabled");A.removeAttribute("disabled");E.removeAttribute("disabled");B.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&D.removeAttribute("disabled"),G.removeAttribute("disabled"),F.removeAttribute("disabled"),C.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(B,
-60)}else H.style.display="none",H.innerHTML="",z.innerHTML="",mxUtils.write(z,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(k,mxResources.get("current")):n.toDateString()===R?mxUtils.write(k,n.toLocaleTimeString()):mxUtils.write(k,n.toLocaleDateString()+" "+n.toLocaleTimeString());
-f.appendChild(k);f.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){w!=b&&(q.stop(),null!=v&&(v.style.backgroundColor=""),w=b,v=f,v.style.backgroundColor="#ebf2f9",l=y=null,z.removeAttribute("title"),z.innerHTML=mxResources.get("loading")+"...",m.style.backgroundColor="#ffffff",t.getModel().clear(),D.setAttribute("disabled","disabled"),
-G.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(B,20),q.spin(m),b.getXml(function(a){w==b&&h(a)},function(a){q.stop();H.style.display="none";H.innerHTML=
-"";z.innerHTML="";mxUtils.write(z,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){F.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(f)}return f}(c[V]);null!=Y&&V==c.length-1&&(N=Y)}L.appendChild(T);k.appendChild(L)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(m.style.display=
-"none",J.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(m.style.display="none",J.style.display="none",mxUtils.write(k,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";J.appendChild(H);J.appendChild(x);J.appendChild(A);J.appendChild(B);J.appendChild(E);a.editor.cancelFirst?(h.appendChild(k),h.appendChild(G),h.appendChild(C),h.appendChild(D),h.appendChild(F)):(h.appendChild(G),
-h.appendChild(C),h.appendChild(D),h.appendChild(F),h.appendChild(k));f.appendChild(h);f.appendChild(J);f.appendChild(z);this.container=f},DraftDialog=function(a,c,b,f,h,k,m,t){var p=document.createElement("div"),d=document.createElement("div");d.style.marginTop="0px";d.style.whiteSpace="nowrap";d.style.overflow="auto";mxUtils.write(d,c);p.appendChild(d);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.marginTop="10px";g.style.width="640px";
-g.style.top="46px";g.style.bottom="74px";g.style.overflow="hidden";mxEvent.disableContextMenu(g);p.appendChild(g);var n=new Graph(g);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),u=0,v=null,w=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):
+"376px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);f.appendChild(m);var p=new Graph(m);p.setTooltips(!1);p.setEnabled(!1);p.setPanning(!0);p.panningHandler.ignoreCell=!0;p.panningHandler.useLeftButtonForPanning=!0;p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;var t=0,d=null,g=0,n=p.getGlobalVariable;p.getGlobalVariable=function(a){return"page"==a&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==a?g+1:n.apply(this,arguments)};p.getLinkForCell=function(){return null};
+Editor.MathJaxRender&&p.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){a.editor.graph.mathEnabled&&Editor.MathJaxRender(p.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,w=null,y=null,l=null,x=mxUtils.button("",function(){null!=y&&p.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",
+mxResources.get("zoomIn"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var z=mxUtils.button("",function(){null!=y&&p.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var E=mxUtils.button("",function(){null!=y&&(p.maxFitScale=8,p.fit(8),
+p.center())});E.className="geSprite geSprite-fit";E.setAttribute("title",mxResources.get("fit"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var C=mxUtils.button("",function(){null!=y&&(p.zoomActual(),p.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 A=document.createElement("div");A.style.position="absolute";A.style.textAlign="right";A.style.color="gray";A.style.marginTop="10px";A.style.backgroundColor="transparent";A.style.top="440px";A.style.right="32px";A.style.maxWidth="380px";A.style.cursor="default";var H=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,d=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?
+a.saveLocalFile(d,b,"text/xml"):(d="undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(a.editor.graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});H.className="geBtn";H.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=l&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(l):a.spinner.spin(document.body,mxResources.get("restoring"))&&
+u.save(!0,function(b){a.spinner.stop();a.replaceFileData(l);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});D.className="geBtn";D.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var I=null;mxEvent.addListener(F,
+"change",function(a){null!=I&&(I(a),mxEvent.consume(a))});var B=mxUtils.button(mxResources.get("open"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});B.className="geBtn";B.setAttribute("disabled","disabled");null!=b&&(B.style.display="none");var G=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl(F.selectedIndex))});G.className="geBtn gePrimaryBtn";
+G.setAttribute("disabled","disabled");null!=b&&(G.style.display="none",D.className="geBtn gePrimaryBtn");h=document.createElement("div");h.style.position="absolute";h.style.top="482px";h.style.width="640px";h.style.textAlign="right";var J=document.createElement("div");J.className="geToolbarContainer";J.style.backgroundColor="transparent";J.style.padding="2px";J.style.border="none";J.style.left="199px";J.style.top="442px";var N=null;if(null!=c&&0<c.length){m.style.cursor="move";var L=document.createElement("table");
+L.style.border="1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var T=document.createElement("tbody"),R=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(t=mxUtils.indexOf(a.pages,a.currentPage));for(var V=c.length-1;0<=V;V--){var Y=function(b){var n=new Date(b.modifiedDate),f=null;if(0<=n.getTime()){var h=function(c){q.stop();var w=mxUtils.parseXml(c),v=a.editor.extractGraphModel(w.documentElement,!0);if(null!=v){var h=function(b){null!=
+b&&(b=k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},k=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";m.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,p.getModel());p.maxFitScale=1;p.fit(8);p.center();return a};F.style.display="none";F.innerHTML="";y=w;l=c;d=parseSelectFunction=null;g=0;if("mxfile"==v.nodeName){w=v.getElementsByTagName("diagram");d=[];for(c=0;c<w.length;c++)d.push(w[c]);
+g=Math.min(t,d.length-1);0<d.length&&h(d[g]);if(1<d.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<d.length;c++)w=document.createElement("option"),mxUtils.write(w,d[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),w.setAttribute("value",c),c==g&&w.setAttribute("selected","selected"),F.appendChild(w);I=function(){g=t=parseInt(F.value);h(d[t])}}else k(v);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");A.innerHTML="";mxUtils.write(A,(null!=
+c?c+" ":"")+n.toLocaleDateString()+" "+n.toLocaleTimeString());A.setAttribute("title",f.getAttribute("title"));x.removeAttribute("disabled");z.removeAttribute("disabled");E.removeAttribute("disabled");C.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&D.removeAttribute("disabled"),H.removeAttribute("disabled"),G.removeAttribute("disabled"),B.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(C,
+60)}else F.style.display="none",F.innerHTML="",A.innerHTML="",mxUtils.write(A,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(k,mxResources.get("current")):n.toDateString()===R?mxUtils.write(k,n.toLocaleTimeString()):mxUtils.write(k,n.toLocaleDateString()+" "+n.toLocaleTimeString());
+f.appendChild(k);f.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){w!=b&&(q.stop(),null!=v&&(v.style.backgroundColor=""),w=b,v=f,v.style.backgroundColor="#ebf2f9",l=y=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",m.style.backgroundColor="#ffffff",p.getModel().clear(),D.setAttribute("disabled","disabled"),
+H.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(C,20),q.spin(m),b.getXml(function(a){w==b&&h(a)},function(a){q.stop();F.style.display="none";F.innerHTML=
+"";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(f)}return f}(c[V]);null!=Y&&V==c.length-1&&(N=Y)}L.appendChild(T);k.appendChild(L)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(m.style.display=
+"none",J.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(m.style.display="none",J.style.display="none",mxUtils.write(k,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";J.appendChild(F);J.appendChild(x);J.appendChild(z);J.appendChild(C);J.appendChild(E);a.editor.cancelFirst?(h.appendChild(k),h.appendChild(H),h.appendChild(B),h.appendChild(D),h.appendChild(G)):(h.appendChild(H),
+h.appendChild(B),h.appendChild(D),h.appendChild(G),h.appendChild(k));f.appendChild(h);f.appendChild(J);f.appendChild(A);this.container=f},DraftDialog=function(a,c,b,f,h,k,m,p){var t=document.createElement("div"),d=document.createElement("div");d.style.marginTop="0px";d.style.whiteSpace="nowrap";d.style.overflow="auto";mxUtils.write(d,c);t.appendChild(d);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.marginTop="10px";g.style.width="640px";
+g.style.top="46px";g.style.bottom="74px";g.style.overflow="hidden";mxEvent.disableContextMenu(g);t.appendChild(g);var n=new Graph(g);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),u=0,v=null,w=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):
 "pagenumber"==a?u+1:w.apply(this,arguments)};n.getLinkForCell=function(){return null};c=mxUtils.button("",function(){n.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);b=mxUtils.button("",function(){n.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline="none";b.style.border="none";b.style.margin=
 "2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);var y=mxUtils.button("",function(){n.zoomActual();n.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";mxUtils.setOpacity(y,
 60);h=mxUtils.button(m||mxResources.get("discard"),h);h.className="geBtn";var l=document.createElement("select");l.style.maxWidth="80px";l.style.position="relative";l.style.top="-2px";l.style.verticalAlign="bottom";l.style.marginRight="6px";l.style.display="none";f=mxUtils.button(k||mxResources.get("edit"),f);f.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";m=document.createElement("div");
 m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";g.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function d(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(d))).documentElement));
 return d}mxEvent.addListener(l,"change",function(a){u=parseInt(l.value);d(v[u]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var c=q.getElementsByTagName("diagram");v=[];for(var f=0;f<c.length;f++)v.push(c[f]);0<v.length&&d(v[u]);if(1<v.length)for(l.style.display="",f=0;f<v.length;f++)c=document.createElement("option"),mxUtils.write(c,v[f].getAttribute("name")||mxResources.get("pageWithNumber",[f+1])),c.setAttribute("value",f),f==u&&c.setAttribute("selected","selected"),l.appendChild(c)}else b(q)};
-m.appendChild(l);m.appendChild(c);m.appendChild(b);m.appendChild(y);m.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";t=null!=t?mxUtils.button(mxResources.get("ignore"),t):null;null!=t&&(t.className="geBtn");a.editor.cancelFirst?(k.appendChild(c),null!=t&&k.appendChild(t),k.appendChild(h),k.appendChild(f)):(k.appendChild(f),k.appendChild(h),null!=t&&k.appendChild(t),k.appendChild(c));p.appendChild(k);p.appendChild(m);this.container=p},FindWindow=
-function(a,c,b,f,h){function k(a,b,d){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var g=0;g<b.length;g++)if("label"!=b[g].nodeName){var c=mxUtils.trim(b[g].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&c.substring(0,d.length)===d||null!=a&&a.test(c))return!0}}return!1}function m(){var a=p.model.getDescendants(p.model.getRoot()),b=q.value.toLowerCase(),c=u.checked?new RegExp(b):null,n=null;d!=b&&(d=b,g=null);var f=null==g;if(0<b.length)for(var v=
-0;v<a.length;v++){var h=p.view.getState(a[v]);if(null!=h&&null!=h.cell.value&&(f||null==n)&&(p.model.isVertex(h.cell)||p.model.isEdge(h.cell))&&(p.isHtmlLabel(h.cell)?(w.innerHTML=p.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([w])):label=p.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||k(c,h.cell,b))||null!=c&&(c.test(label)||k(c,h.cell,b))))if(f){n=h;break}else null==n&&(n=h);f=f||h==g}null!=
-n?(g=n,p.scrollCellToVisible(g.cell),p.isEnabled()?p.setSelectionCell(g.cell):p.highlightCell(g.cell)):p.isEnabled()&&p.clearSelection();return 0==b.length||null!=n}var t=a.actions.get("find"),p=a.editor.graph,d=null,g=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom=
+m.appendChild(l);m.appendChild(c);m.appendChild(b);m.appendChild(y);m.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";p=null!=p?mxUtils.button(mxResources.get("ignore"),p):null;null!=p&&(p.className="geBtn");a.editor.cancelFirst?(k.appendChild(c),null!=p&&k.appendChild(p),k.appendChild(h),k.appendChild(f)):(k.appendChild(f),k.appendChild(h),null!=p&&k.appendChild(p),k.appendChild(c));t.appendChild(k);t.appendChild(m);this.container=t},FindWindow=
+function(a,c,b,f,h){function k(a,b,d){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var g=0;g<b.length;g++)if("label"!=b[g].nodeName){var c=mxUtils.trim(b[g].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&c.substring(0,d.length)===d||null!=a&&a.test(c))return!0}}return!1}function m(){var a=t.model.getDescendants(t.model.getRoot()),b=q.value.toLowerCase(),c=u.checked?new RegExp(b):null,n=null;d!=b&&(d=b,g=null);var f=null==g;if(0<b.length)for(var v=
+0;v<a.length;v++){var h=t.view.getState(a[v]);if(null!=h&&null!=h.cell.value&&(f||null==n)&&(t.model.isVertex(h.cell)||t.model.isEdge(h.cell))&&(t.isHtmlLabel(h.cell)?(w.innerHTML=t.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([w])):label=t.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||k(c,h.cell,b))||null!=c&&(c.test(label)||k(c,h.cell,b))))if(f){n=h;break}else null==n&&(n=h);f=f||h==g}null!=
+n?(g=n,t.scrollCellToVisible(g.cell),t.isEnabled()?t.setSelectionCell(g.cell):t.highlightCell(g.cell)):t.isEnabled()&&t.clearSelection();return 0==b.length||null!=n}var p=a.actions.get("find"),t=a.editor.graph,d=null,g=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom=
 "6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";n.appendChild(q);mxUtils.br(n);var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";n.appendChild(u);mxUtils.write(n,mxResources.get("regularExpression"));var v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";n.appendChild(v);var w=document.createElement("div");
 mxUtils.br(n);v=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";d=g=null;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";n.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=m()?"":"#ffcfcf"}catch(y){a.handleError(y)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";
-n.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)t.funct();else if(d!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=m()?"":"#ffcfcf"}catch(l){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(t.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,c,b,f,h,!0,!0);this.window.destroyOnClose=
-!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},TagsWindow=function(a,c,b,f,h){var k=a.editor.graph,m="tags",t=document.createElement("div");t.style.userSelect="none";t.style.overflow="hidden";t.style.padding=
-"10px";t.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("allTags"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.width="260px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";t.appendChild(p);if(!a.isOffline()||mxClient.IS_CHROMEAPP){p.style.width="240px";var d=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");d.firstChild.style.marginBottom="6px";d.style.marginLeft=
-"6px";t.appendChild(d)}mxEvent.addListener(p,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});p.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(t);d=mxUtils.button(mxResources.get("hide"),function(){var a=k.getCellsForTags(p.value.split(" "),void 0,m);k.setCellsVisible(a,!1)});d.setAttribute("title",
-mxResources.get("hide"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";t.appendChild(d);d=mxUtils.button(mxResources.get("show"),function(){var a=k.getCellsForTags(p.value.split(" "),void 0,m);k.setCellsVisible(a,!0);if(k.isEnabled())k.setSelectionCells(a);else for(var b=0;b<a.length;b++)k.highlightCell(a[b])});d.setAttribute("title",mxResources.get("show"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";t.appendChild(d);var g=a.actions.get("tags"),d=
-mxUtils.button(mxResources.get("close"),function(){g.funct()});d.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");d.style.marginTop="8px";d.className="geBtn gePrimaryBtn";t.appendChild(d);mxEvent.addListener(p,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||g.funct()});this.window=new mxWindow(mxResources.get("tags"),t,c,b,f,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,
-function(){this.window.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):k.container.focus()}))},AuthDialog=function(a,c,b,f){var h=document.createElement("div");h.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("authorizationRequired"));var m="Unknown",t=document.createElement("img");
-t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.marginRight="10px";c==a.drive?(m=mxResources.get("googleDrive"),t.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(m=mxResources.get("dropbox"),t.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(m=mxResources.get("oneDrive"),t.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(m=mxResources.get("github"),t.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(m=mxResources.get("trello"),t.src=IMAGE_PATH+
-"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var p=document.createElement("input");p.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){f(p.checked)});m.insertBefore(t,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";h.appendChild(k);h.appendChild(a);h.appendChild(m);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(p),k=document.createElement("span"),mxUtils.write(k,
-" "+mxResources.get("rememberMe")),b.appendChild(k),h.appendChild(b),p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)}));this.container=h},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var f=document.createElement("div"),h=[];if(null!=a.sidebar.customEntries)for(var k=0;k<a.sidebar.customEntries.length;k++){for(var m=a.sidebar.customEntries[k],t={title:a.getResource(m.title),entries:[]},p=0;p<m.entries.length;p++){var d=
-m.entries[p];t.entries.push({id:d.id,title:a.getResource(d.title),desc:a.getResource(d.desc),image:d.preview})}h.push(t)}for(k=0;k<b.length;k++)if(null==a.sidebar.enabledLibraries)h.push(b[k]);else{t={title:b[k].title,entries:[]};for(p=0;p<b[k].entries.length;p++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[k].entries[p].id)&&t.entries.push(b[k].entries[p]);0<t.entries.length&&h.push(t)}b=h;if(c){p=document.createElement("div");p.className="geDialogTitle";mxUtils.write(p,mxResources.get("shapes"));
-p.style.position="absolute";p.style.top="0px";p.style.left="0px";p.style.lineHeight="40px";p.style.height="40px";p.style.right="0px";mxClient.IS_QUIRKS&&(p.style.width="718px");var g=document.createElement("div"),n=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");n.style.position="absolute";n.style.left="202px";n.style.right=
-"0px";n.style.top="40px";n.style.bottom="60px";n.style.overflow="auto";n.style.borderLeft="1px solid rgb(211, 211, 211)";n.style.textAlign="center";mxClient.IS_QUIRKS&&(n.style.width=parseInt(p.style.width)-202+"px",n.style.height=g.style.height,n.style.marginTop=g.style.marginTop);var q=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";for(k=0;k<b.length;k++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=
+n.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)p.funct();else if(d!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=m()?"":"#ffcfcf"}catch(l){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(p.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,c,b,f,h,!0,!0);this.window.destroyOnClose=
+!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):t.container.focus()}))},TagsWindow=function(a,c,b,f,h){var k=a.editor.graph,m="tags",p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding=
+"10px";p.style.height="100%";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("allTags"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.width="260px";t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";p.appendChild(t);if(!a.isOffline()||mxClient.IS_CHROMEAPP){t.style.width="240px";var d=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");d.firstChild.style.marginBottom="6px";d.style.marginLeft=
+"6px";p.appendChild(d)}mxEvent.addListener(t,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});t.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(p);d=mxUtils.button(mxResources.get("hide"),function(){var a=k.getCellsForTags(t.value.split(" "),void 0,m);k.setCellsVisible(a,!1)});d.setAttribute("title",
+mxResources.get("hide"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";p.appendChild(d);d=mxUtils.button(mxResources.get("show"),function(){var a=k.getCellsForTags(t.value.split(" "),void 0,m);k.setCellsVisible(a,!0);if(k.isEnabled())k.setSelectionCells(a);else for(var b=0;b<a.length;b++)k.highlightCell(a[b])});d.setAttribute("title",mxResources.get("show"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";p.appendChild(d);var g=a.actions.get("tags"),d=
+mxUtils.button(mxResources.get("close"),function(){g.funct()});d.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");d.style.marginTop="8px";d.className="geBtn gePrimaryBtn";p.appendChild(d);mxEvent.addListener(t,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||g.funct()});this.window=new mxWindow(mxResources.get("tags"),p,c,b,f,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,
+function(){this.window.isVisible()?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)):k.container.focus()}))},AuthDialog=function(a,c,b,f){var h=document.createElement("div");h.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("authorizationRequired"));var m="Unknown",p=document.createElement("img");
+p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.marginRight="10px";c==a.drive?(m=mxResources.get("googleDrive"),p.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(m=mxResources.get("dropbox"),p.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(m=mxResources.get("oneDrive"),p.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(m=mxResources.get("github"),p.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(m=mxResources.get("trello"),p.src=IMAGE_PATH+
+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var t=document.createElement("input");t.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){f(t.checked)});m.insertBefore(p,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";h.appendChild(k);h.appendChild(a);h.appendChild(m);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(t),k=document.createElement("span"),mxUtils.write(k,
+" "+mxResources.get("rememberMe")),b.appendChild(k),h.appendChild(b),t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)}));this.container=h},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var f=document.createElement("div"),h=[];if(null!=a.sidebar.customEntries)for(var k=0;k<a.sidebar.customEntries.length;k++){for(var m=a.sidebar.customEntries[k],p={title:a.getResource(m.title),entries:[]},t=0;t<m.entries.length;t++){var d=
+m.entries[t];p.entries.push({id:d.id,title:a.getResource(d.title),desc:a.getResource(d.desc),image:d.preview})}h.push(p)}for(k=0;k<b.length;k++)if(null==a.sidebar.enabledLibraries)h.push(b[k]);else{p={title:b[k].title,entries:[]};for(t=0;t<b[k].entries.length;t++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[k].entries[t].id)&&p.entries.push(b[k].entries[t]);0<p.entries.length&&h.push(p)}b=h;if(c){t=document.createElement("div");t.className="geDialogTitle";mxUtils.write(t,mxResources.get("shapes"));
+t.style.position="absolute";t.style.top="0px";t.style.left="0px";t.style.lineHeight="40px";t.style.height="40px";t.style.right="0px";mxClient.IS_QUIRKS&&(t.style.width="718px");var g=document.createElement("div"),n=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");n.style.position="absolute";n.style.left="202px";n.style.right=
+"0px";n.style.top="40px";n.style.bottom="60px";n.style.overflow="auto";n.style.borderLeft="1px solid rgb(211, 211, 211)";n.style.textAlign="center";mxClient.IS_QUIRKS&&(n.style.width=parseInt(t.style.width)-202+"px",n.style.height=g.style.height,n.style.marginTop=g.style.marginTop);var q=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";for(k=0;k<b.length;k++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=
 "dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);g.appendChild(d);for(var c=0;c<b.entries.length;c++)(function(b){var d=v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";var l=document.createElement("input");l.setAttribute("type","checkbox");l.checked=a.sidebar.isEntryVisible(b.id);l.defaultChecked=l.checked;d.appendChild(l);mxUtils.write(d," "+b.title);g.appendChild(d);var f=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){n.style.textAlign=
 "center";n.style.padding="0px";n.style.color="";n.innerHTML="";if(null!=b.desc){var g=document.createElement("pre");g.style.boxSizing="border-box";g.style.fontFamily="inherit";g.style.margin="20px";g.style.right="0px";g.style.textAlign="left";mxUtils.write(g,b.desc);n.appendChild(g)}null!=b.imageCallback?b.imageCallback(n):null!=b.image?n.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(n.style.padding="20px",n.style.color="rgb(179, 179, 179)",mxUtils.write(n,mxResources.get("noPreview")));
-null!=q&&(q.style.backgroundColor="");q=d;q.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",f);mxEvent.addListener(d,"dblclick",function(a){l.checked=!l.checked;mxEvent.consume(a)});u.push(function(){return l.checked?b.id:null});0==k&&0==c&&f()})(b.entries[c])})(b[k]);f.style.padding="30px";f.appendChild(p);f.appendChild(g);f.appendChild(n);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
-b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=p.style.width,b.style.paddingTop="12px");var w=document.createElement("input");w.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)p=document.createElement("span"),p.style.paddingRight="20px",p.appendChild(w),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),w.checked=!0,w.defaultChecked=
-!0,mxEvent.addListener(p,"click",function(a){mxEvent.getSource(a)!=w&&(w.checked=!w.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(p.style.position="relative",p.style.top="-6px"),b.appendChild(p);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],d=0;d<u.length;d++){var g=u[d].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(b.join(";"),w.checked,!0)});c.className=
-"geBtn gePrimaryBtn"}else{var y=document.createElement("table"),p=document.createElement("tbody");f.style.height="100%";f.style.overflow="auto";t=document.createElement("tr");y.style.width="100%";c=document.createElement("td");var h=document.createElement("td"),m=document.createElement("td"),l=mxUtils.bind(this,function(b,d,g){var c=document.createElement("input");c.type="checkbox";y.appendChild(c);c.checked=a.sidebar.isEntryVisible(g);var l=document.createElement("span");mxUtils.write(l,d);d=document.createElement("div");
-d.style.display="block";d.appendChild(c);d.appendChild(l);mxEvent.addListener(l,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});b.appendChild(d);return function(){return c.checked?g:null}});t.appendChild(c);t.appendChild(h);t.appendChild(m);p.appendChild(t);y.appendChild(p);for(var u=[],x=0,k=0;k<b.length;k++)for(p=0;p<b[k].entries.length;p++)x++;for(var A=[c,h,m],E=0,k=0;k<b.length;k++)(function(a){for(var b=0;b<a.entries.length;b++){var d=a.entries[b];u.push(l(A[Math.floor(E/(x/3))],
-d.title,d.id));E++}})(b[k]);f.appendChild(y);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,b.appendChild(w),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),b.appendChild(p),mxEvent.addListener(p,"click",function(a){w.checked=!w.checked;mxEvent.consume(a)}));f.appendChild(b);p=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});p.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],d=0;d<u.length;d++){var g=u[d].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(0<b.length?b.join(";"):"",w.checked);a.hideDialog()});c.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(p),b.appendChild(c)):(b.appendChild(c),b.appendChild(p));f.appendChild(b);this.container=
+null!=q&&(q.style.backgroundColor="");q=d;q.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",f);mxEvent.addListener(d,"dblclick",function(a){l.checked=!l.checked;mxEvent.consume(a)});u.push(function(){return l.checked?b.id:null});0==k&&0==c&&f()})(b.entries[c])})(b[k]);f.style.padding="30px";f.appendChild(t);f.appendChild(g);f.appendChild(n);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
+b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=t.style.width,b.style.paddingTop="12px");var w=document.createElement("input");w.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)t=document.createElement("span"),t.style.paddingRight="20px",t.appendChild(w),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),w.checked=!0,w.defaultChecked=
+!0,mxEvent.addListener(t,"click",function(a){mxEvent.getSource(a)!=w&&(w.checked=!w.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(t.style.position="relative",t.style.top="-6px"),b.appendChild(t);t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],d=0;d<u.length;d++){var g=u[d].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(b.join(";"),w.checked,!0)});c.className=
+"geBtn gePrimaryBtn"}else{var y=document.createElement("table"),t=document.createElement("tbody");f.style.height="100%";f.style.overflow="auto";p=document.createElement("tr");y.style.width="100%";c=document.createElement("td");var h=document.createElement("td"),m=document.createElement("td"),l=mxUtils.bind(this,function(b,d,g){var c=document.createElement("input");c.type="checkbox";y.appendChild(c);c.checked=a.sidebar.isEntryVisible(g);var l=document.createElement("span");mxUtils.write(l,d);d=document.createElement("div");
+d.style.display="block";d.appendChild(c);d.appendChild(l);mxEvent.addListener(l,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});b.appendChild(d);return function(){return c.checked?g:null}});p.appendChild(c);p.appendChild(h);p.appendChild(m);t.appendChild(p);y.appendChild(t);for(var u=[],x=0,k=0;k<b.length;k++)for(t=0;t<b[k].entries.length;t++)x++;for(var z=[c,h,m],E=0,k=0;k<b.length;k++)(function(a){for(var b=0;b<a.entries.length;b++){var d=a.entries[b];u.push(l(z[Math.floor(E/(x/3))],
+d.title,d.id));E++}})(b[k]);f.appendChild(y);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,b.appendChild(w),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),b.appendChild(t),mxEvent.addListener(t,"click",function(a){w.checked=!w.checked;mxEvent.consume(a)}));f.appendChild(b);t=mxUtils.button(mxResources.get("cancel"),
+function(){a.hideDialog()});t.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],d=0;d<u.length;d++){var g=u[d].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(0<b.length?b.join(";"):"",w.checked);a.hideDialog()});c.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(t),b.appendChild(c)):(b.appendChild(c),b.appendChild(t));f.appendChild(b);this.container=
 f},PluginsDialog=function(a){function c(){if(0==h.length)f.innerHTML=mxResources.get("noPlugins");else{f.innerHTML="";for(var b=0;b<h.length;b++){var d=document.createElement("span");d.style.whiteSpace="nowrap";var q=document.createElement("span");q.className="geSprite geSprite-delete";q.style.position="relative";q.style.cursor="pointer";q.style.top="5px";q.style.marginRight="4px";q.style.display="inline-block";d.appendChild(q);mxUtils.write(d,h[b]);f.appendChild(d);mxUtils.br(f);mxEvent.addListener(q,
 "click",function(b){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+h[b]+'"?',function(){h.splice(b,1);c()})}}(b))}}}var b=document.createElement("div"),f=document.createElement("div");f.style.height="120px";f.style.overflow="auto";var h=mxSettings.getPlugins().slice();b.appendChild(f);c();var k=mxUtils.button(mxResources.get("add"),function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var f=d.split(";"),d=0;d<f.length;d++){var u=App.pluginRegistry[f[d]];null!=u&&
 (b+=u+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){f=a.split(";");for(a=0;a<f.length;a++){var b=f[a],d=App.pluginRegistry[b];null!=d&&(b=d);0<b.length&&0>mxUtils.indexOf(h,b)&&h.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});k.className="geBtn";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-m.className="geBtn";var t=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(h);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});t.className="geBtn gePrimaryBtn";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");var d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
-"right";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(p),d.appendChild(k),d.appendChild(t)):(d.appendChild(p),d.appendChild(k),d.appendChild(t),d.appendChild(m));b.appendChild(d);this.container=b},CropImageDialog=function(a,c,b){var f=document.createElement("div"),h=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),t=document.createElement("td");t.style.whiteSpace="nowrap";t.setAttribute("colspan","2");mxUtils.write(t,mxResources.get("loading")+
-"...");m.appendChild(t);k.appendChild(m);var m=document.createElement("tr"),p=document.createElement("td"),d=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value="0";this.init=function(){g.focus();g.select()};d.appendChild(g);m.appendChild(p);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");
-mxUtils.write(p,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";d.appendChild(n);m.appendChild(p);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";d.appendChild(q);m.appendChild(p);m.appendChild(d);
-k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";d.appendChild(u);m.appendChild(p);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");m.appendChild(p);var v=document.createElement("input");
+m.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(h);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});p.className="geBtn gePrimaryBtn";var t=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});t.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");var d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
+"right";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(t),d.appendChild(k),d.appendChild(p)):(d.appendChild(t),d.appendChild(k),d.appendChild(p),d.appendChild(m));b.appendChild(d);this.container=b},CropImageDialog=function(a,c,b){var f=document.createElement("div"),h=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),p=document.createElement("td");p.style.whiteSpace="nowrap";p.setAttribute("colspan","2");mxUtils.write(p,mxResources.get("loading")+
+"...");m.appendChild(p);k.appendChild(m);var m=document.createElement("tr"),t=document.createElement("td"),d=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(t,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value="0";this.init=function(){g.focus();g.select()};d.appendChild(g);m.appendChild(t);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");
+mxUtils.write(t,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";d.appendChild(n);m.appendChild(t);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";d.appendChild(q);m.appendChild(t);m.appendChild(d);
+k.appendChild(m);m=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";d.appendChild(u);m.appendChild(t);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("circle")+":");m.appendChild(t);var v=document.createElement("input");
 v.setAttribute("type","checkbox");d.appendChild(v);m.appendChild(d);k.appendChild(m);h.appendChild(k);f.appendChild(h);var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var d=document.createElement("canvas"),c=d.getContext("2d"),f=w.width,h=w.height,k=parseInt(g.value),m=parseInt(n.value),f=Math.max(1,f-k-parseInt(q.value)),h=Math.max(1,h-m-parseInt(u.value));d.width=f;d.height=h;v.checked&&(c.fillStyle=
-"#000000",c.arc(f/2,h/2,Math.min(f/2,h/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,k,m,f,h,0,0,f,h);b(d.toDataURL())});y.setAttribute("disabled","disabled");w.onload=function(){y.removeAttribute("disabled");t.innerHTML="";mxUtils.write(t,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+": "+w.height)};w.src=c;mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&y.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
-"right";a.editor.cancelFirst?(c.appendChild(h),c.appendChild(y)):(c.appendChild(y),c.appendChild(h));f.appendChild(c);this.container=f},EditGeometryDialog=function(a,c){var b=a.editor.graph,f=1==c.length?b.getCellGeometry(c[0]):null,h=document.createElement("div"),k=document.createElement("table"),m=document.createElement("tbody"),t=document.createElement("tr"),p=document.createElement("td"),d=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("relative")+":");
-var g=document.createElement("input");g.setAttribute("type","checkbox");null!=f&&f.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=f?f.x:"";
-d.appendChild(n);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=f?f.y:"";d.appendChild(q);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("dx")+
-":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=f&&null!=f.offset?f.offset.x:"";d.appendChild(u);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=f&&null!=f.offset?f.offset.y:"";d.appendChild(v);t.appendChild(p);
-t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("width")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.width="100px";w.value=null!=f?f.width:"";d.appendChild(w);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("height")+":");var y=
-document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=f?f.height:"";d.appendChild(y);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("rotation")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
-d.appendChild(l);t.appendChild(p);t.appendChild(d);m.appendChild(t);k.appendChild(m);h.appendChild(k);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var f=b.getCellGeometry(c[d]);null!=f&&(f=f.clone(),b.isCellMovable(c[d])&&(f.relative=g.checked,0<mxUtils.trim(n.value).length&&(f.x=Number(n.value)),0<mxUtils.trim(q.value).length&&
+"#000000",c.arc(f/2,h/2,Math.min(f/2,h/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,k,m,f,h,0,0,f,h);b(d.toDataURL())});y.setAttribute("disabled","disabled");w.onload=function(){y.removeAttribute("disabled");p.innerHTML="";mxUtils.write(p,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+": "+w.height)};w.src=c;mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&y.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
+"right";a.editor.cancelFirst?(c.appendChild(h),c.appendChild(y)):(c.appendChild(y),c.appendChild(h));f.appendChild(c);this.container=f},EditGeometryDialog=function(a,c){var b=a.editor.graph,f=1==c.length?b.getCellGeometry(c[0]):null,h=document.createElement("div"),k=document.createElement("table"),m=document.createElement("tbody"),p=document.createElement("tr"),t=document.createElement("td"),d=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(t,mxResources.get("relative")+":");
+var g=document.createElement("input");g.setAttribute("type","checkbox");null!=f&&f.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=f?f.x:"";
+d.appendChild(n);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=f?f.y:"";d.appendChild(q);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("dx")+
+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=f&&null!=f.offset?f.offset.x:"";d.appendChild(u);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=f&&null!=f.offset?f.offset.y:"";d.appendChild(v);p.appendChild(t);
+p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("width")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.width="100px";w.value=null!=f?f.width:"";d.appendChild(w);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("height")+":");var y=
+document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=f?f.height:"";d.appendChild(y);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("rotation")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
+d.appendChild(l);p.appendChild(t);p.appendChild(d);m.appendChild(p);k.appendChild(m);h.appendChild(k);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var f=b.getCellGeometry(c[d]);null!=f&&(f=f.clone(),b.isCellMovable(c[d])&&(f.relative=g.checked,0<mxUtils.trim(n.value).length&&(f.x=Number(n.value)),0<mxUtils.trim(q.value).length&&
 (f.y=Number(q.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(v.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(w.value).length&&(f.width=Number(w.value)),0<mxUtils.trim(y.value).length&&(f.height=Number(y.value))),b.getModel().setGeometry(c[d],f));0<mxUtils.trim(l.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(l.value),[c[d]])}}finally{b.getModel().endUpdate()}});
 x.className="geBtn gePrimaryBtn";mxEvent.addListener(h,"keypress",function(a){13==a.keyCode&&x.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(f),k.appendChild(x)):(k.appendChild(x),k.appendChild(f));h.appendChild(k);this.container=h},LibraryDialog=function(a,c,b,f,h,k){function m(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var d=u.firstChild,
-b=0;null!=d&&d!=a;)d=d.nextSibling,b++;return b}function t(b,d,c,l,n,f,q,h,k){try{if(null==d||"image/"==d.substring(0,6))if(null==b&&null!=q||null==w[b]){var B=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));D.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var z=n,p=f;if(n>a.maxImageSize||f>
-a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,n)),a.maxImageSize/Math.max(1,f));n*=C;f*=C}z>p?(p=Math.round(100*p/z),z=100):(z=Math.round(100*z/p),p=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=b){var F=document.createElement("img");F.setAttribute("src",A.convert(b));
-F.style.width=z+"px";F.style.height=p+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-p)/2)+"px";F.style.paddingLeft=Math.floor((100-z)/2)+"px";G.appendChild(F)}else if(null!=q){var H=a.stringToCells(a.editor.graph.decompress(q.xml));0<H.length&&(a.sidebar.createThumb(H,100,100,G,null,!0,!1),G.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",G.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border",
-"0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.position="absolute";J.style.marginLeft="-12px";J.style.zIndex="1";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,d){mxEvent.addListener(J,"click",function(c){w[b]=null;for(var l=0;l<g.length;l++)if(null!=g[l].data&&g[l].data==b||null!=g[l].xml&&null!=d&&g[l].xml==d.xml){g.splice(l,1);break}G.parentNode.removeChild(a);0==g.length&&
-(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(c)});mxEvent.addListener(J,"dblclick",function(a){mxEvent.consume(a)})})(G,b,q);G.appendChild(J);G.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left="10px";D.style.right="10px";D.style.backgroundColor="#ffffff";D.style.overflow="hidden";D.style.textAlign="center";var L=null;null!=b?(L={data:b,
-w:n,h:f,title:k},null!=h&&(L.aspect=h),w[b]=F,g.push(L)):null!=q&&(q.aspect="fixed",g.push(q),L=q);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});B();G.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});H=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var d=new FilenameDialog(a,L.title||"",mxResources.get("ok"),
-function(a){null!=a&&(L.title=a,B())},mxResources.get("enterValue"));a.showDialog(d.container,300,80,!0,!0);d.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==L.title||0==L.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");D.focus();document.execCommand("selectAll",!1,null);x=function(){D.removeAttribute("contentEditable");D.style.cursor=
-"pointer";L.title=D.innerHTML;B()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",H);mxEvent.addListener(G,"dblclick",H);u.appendChild(G);mxEvent.addListener(G,"dragstart",function(a){null==b&&null!=q&&(J.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);y=m(a);mxClient.IS_GC&&(G.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(G,30);J.style.visibility=
-"";D.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else E||(E=!0,a.handleError({message:mxResources.get("fileExists")}));else{n=!1;try{if(a.spinner.stop(),z=mxUtils.parseXml(b),"mxlibrary"==z.documentElement.nodeName){p=JSON.parse(mxUtils.getTextContent(z.documentElement));if(null!=p&&0<p.length)for(var N=0;N<p.length;N++)null!=
-p[N].xml?t(null,null,0,0,0,0,p[N]):t(p[N].data,null,0,0,p[N].w,p[N].h,null,"fixed",p[N].title);n=!0}else if("mxfile"==z.documentElement.nodeName){for(var I=z.documentElement.getElementsByTagName("diagram"),N=0;N<I.length;N++){var p=mxUtils.getTextContent(I[N]),H=a.stringToCells(a.editor.graph.decompress(p)),S=a.editor.graph.getBoundingBoxFromGeometry(H);t(null,null,0,0,0,0,{xml:p,w:S.width,h:S.height})}n=!0}}catch(ba){}n||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}
-function p(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function d(b){b.stopPropagation();b.preventDefault();E=!1;l=m(b);if(null!=y)null!=l&&l<u.children.length?(g.splice(l>y?l-1:l,0,g.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[l])):(g.push(g.splice(y,1)[0]),u.appendChild(u.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=
-decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&a.loadImage(d,function(a){t(d,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var g=[];b=document.createElement("div");b.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";b.appendChild(n);mxUtils.write(n,mxResources.get("filename")+
+b=0;null!=d&&d!=a;)d=d.nextSibling,b++;return b}function p(b,d,c,l,n,f,q,h,k){try{if(null==d||"image/"==d.substring(0,6))if(null==b&&null!=q||null==w[b]){var C=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));D.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var t=n,A=f;if(n>a.maxImageSize||f>
+a.maxImageSize){var B=Math.min(1,Math.min(a.maxImageSize/Math.max(1,n)),a.maxImageSize/Math.max(1,f));n*=B;f*=B}t>A?(A=Math.round(100*A/t),t=100):(t=Math.round(100*t/A),A=100);var H=document.createElement("div");H.setAttribute("draggable","true");H.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";H.style.position="relative";H.style.cursor="move";mxUtils.setPrefixedStyle(H.style,"transition","transform .1s ease-in-out");if(null!=b){var F=document.createElement("img");F.setAttribute("src",z.convert(b));
+F.style.width=t+"px";F.style.height=A+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-A)/2)+"px";F.style.paddingLeft=Math.floor((100-t)/2)+"px";H.appendChild(F)}else if(null!=q){var G=a.stringToCells(a.editor.graph.decompress(q.xml));0<G.length&&(a.sidebar.createThumb(G,100,100,H,null,!0,!1),H.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",H.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border",
+"0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.position="absolute";J.style.marginLeft="-12px";J.style.zIndex="1";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,d){mxEvent.addListener(J,"click",function(c){w[b]=null;for(var l=0;l<g.length;l++)if(null!=g[l].data&&g[l].data==b||null!=g[l].xml&&null!=d&&g[l].xml==d.xml){g.splice(l,1);break}H.parentNode.removeChild(a);0==g.length&&
+(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(c)});mxEvent.addListener(J,"dblclick",function(a){mxEvent.consume(a)})})(H,b,q);H.appendChild(J);H.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left="10px";D.style.right="10px";D.style.backgroundColor="#ffffff";D.style.overflow="hidden";D.style.textAlign="center";var L=null;null!=b?(L={data:b,
+w:n,h:f,title:k},null!=h&&(L.aspect=h),w[b]=F,g.push(L)):null!=q&&(q.aspect="fixed",g.push(q),L=q);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});C();H.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});G=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var d=new FilenameDialog(a,L.title||"",mxResources.get("ok"),
+function(a){null!=a&&(L.title=a,C())},mxResources.get("enterValue"));a.showDialog(d.container,300,80,!0,!0);d.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==L.title||0==L.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");D.focus();document.execCommand("selectAll",!1,null);x=function(){D.removeAttribute("contentEditable");D.style.cursor=
+"pointer";L.title=D.innerHTML;C()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",G);mxEvent.addListener(H,"dblclick",G);u.appendChild(H);mxEvent.addListener(H,"dragstart",function(a){null==b&&null!=q&&(J.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);y=m(a);mxClient.IS_GC&&(H.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(H.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(H,30);J.style.visibility=
+"";D.style.visibility=""},0)});mxEvent.addListener(H,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(H,100);mxUtils.setPrefixedStyle(H.style,"transform",null)})}else E||(E=!0,a.handleError({message:mxResources.get("fileExists")}));else{n=!1;try{if(a.spinner.stop(),t=mxUtils.parseXml(b),"mxlibrary"==t.documentElement.nodeName){A=JSON.parse(mxUtils.getTextContent(t.documentElement));if(null!=A&&0<A.length)for(var N=0;N<A.length;N++)null!=
+A[N].xml?p(null,null,0,0,0,0,A[N]):p(A[N].data,null,0,0,A[N].w,A[N].h,null,"fixed",A[N].title);n=!0}else if("mxfile"==t.documentElement.nodeName){for(var I=t.documentElement.getElementsByTagName("diagram"),N=0;N<I.length;N++){var A=mxUtils.getTextContent(I[N]),G=a.stringToCells(a.editor.graph.decompress(A)),S=a.editor.graph.getBoundingBoxFromGeometry(G);p(null,null,0,0,0,0,{xml:A,w:S.width,h:S.height})}n=!0}}catch(ba){}n||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}
+function t(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function d(b){b.stopPropagation();b.preventDefault();E=!1;l=m(b);if(null!=y)null!=l&&l<u.children.length?(g.splice(l>y?l-1:l,0,g.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[l])):(g.push(g.splice(y,1)[0]),u.appendChild(u.children[y]));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 d=
+decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&a.loadImage(d,function(a){p(d,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var g=[];b=document.createElement("div");b.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";b.appendChild(n);mxUtils.write(n,mxResources.get("filename")+
 ":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==h||h.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};n.appendChild(q);var u=document.createElement("div");u.style.borderWidth=
 "1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";
-mxUtils.write(v,mxResources.get("dragImagesHere"));b.appendChild(v);var w={},y=null,l=null,x=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var A=new mxUrlConverter,E=!1;if(null!=f)for(c=0;c<f.length;c++)n=f[c],t(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var B=function(b){return function(d,g,c,l,n,f,q,w,A){null!=A&&(/(\.vsdx)($|\?)/i.test(A.name)||/(\.vssx)($|\?)/i.test(A.name))?a.importVisio(A,mxUtils.bind(this,function(d){a.spinner.stop();t(d,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=A&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(d,A.name)?
-a.parseFile(A,mxUtils.bind(this,function(d){4==d.readyState&&(a.spinner.stop(),200<=d.status&&299>=d.status&&(t(d.responseText,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(t(d,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",p);mxEvent.addListener(u,"drop",d);mxEvent.addListener(v,"dragover",p);mxEvent.addListener(v,
+mxUtils.write(v,mxResources.get("dragImagesHere"));b.appendChild(v);var w={},y=null,l=null,x=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var z=new mxUrlConverter,E=!1;if(null!=f)for(c=0;c<f.length;c++)n=f[c],p(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor=
+"";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var C=function(b){return function(d,g,c,l,n,f,q,w,z){null!=z&&(/(\.vsdx)($|\?)/i.test(z.name)||/(\.vssx)($|\?)/i.test(z.name))?a.importVisio(z,mxUtils.bind(this,function(d){a.spinner.stop();p(d,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(d,z.name)?
+a.parseFile(z,mxUtils.bind(this,function(d){4==d.readyState&&(a.spinner.stop(),200<=d.status&&299>=d.status&&(p(d.responseText,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(p(d,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",t);mxEvent.addListener(u,"drop",d);mxEvent.addListener(v,"dragover",t);mxEvent.addListener(v,
 "drop",d);b.appendChild(u);f=document.createElement("div");f.style.textAlign="right";f.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&f.appendChild(c);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(g),d=q.value;/(\.xml)$/i.test(d)||(d+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,d,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,
-"filename="+encodeURIComponent(d)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";f.appendChild(n);var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(z,"change",function(b){E=!1;a.importFiles(z.files,0,0,a.maxImageSize,function(a,d,g,c,l,n,f,q,u){B(b)(a,d,g,c,l,n,f,q,u);z.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),
-function(){null!=x&&(x(),x=null);z.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",f.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,d){E=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var g=a.indexOf(",");0<g&&(a=a.substring(0,g)+";base64,"+a.substring(g+1))}t(a,null,0,0,b,d);u.scrollTop=u.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";
-f.appendChild(n);this.saveBtnClickHandler=function(b,d,g,c){a.saveLibrary(b,d,g,c)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(q.value,g,h,k)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";f.appendChild(n);a.editor.cancelFirst||f.appendChild(c);b.appendChild(f);this.container=b},EditShapeDialog=function(a,c,b,f,h){f=null!=f?f:300;h=null!=h?h:120;var k,m,t=document.createElement("table"),p=document.createElement("tbody");
-t.style.cellPadding="4px";k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,b);k.appendChild(m);p.appendChild(k);k=document.createElement("tr");m=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=f-200+"px";d.style.height=h+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};m.appendChild(d);k.appendChild(m);m=document.createElement("td");
+"filename="+encodeURIComponent(d)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";f.appendChild(n);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(b){E=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,d,g,c,l,n,f,q,u){C(b)(a,d,g,c,l,n,f,q,u);A.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),
+function(){null!=x&&(x(),x=null);A.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",f.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,d){E=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var g=a.indexOf(",");0<g&&(a=a.substring(0,g)+";base64,"+a.substring(g+1))}p(a,null,0,0,b,d);u.scrollTop=u.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";
+f.appendChild(n);this.saveBtnClickHandler=function(b,d,g,c){a.saveLibrary(b,d,g,c)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(q.value,g,h,k)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";f.appendChild(n);a.editor.cancelFirst||f.appendChild(c);b.appendChild(f);this.container=b},EditShapeDialog=function(a,c,b,f,h){f=null!=f?f:300;h=null!=h?h:120;var k,m,p=document.createElement("table"),t=document.createElement("tbody");
+p.style.cellPadding="4px";k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,b);k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=f-200+"px";d.style.height=h+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};m.appendChild(d);k.appendChild(m);m=document.createElement("td");
 b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=h+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);m.appendChild(b);var g=new Graph(b);g.setEnabled(!1);var n=a.editor.graph.cloneCell(c);g.addCells([n]);b=g.view.getState(n);var q="";null!=b.shape&&null!=b.shape.stencil&&(q=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(d,q||"");b=g.getGraphBounds();
-h=Math.min(160/b.width,(h-40)/b.height);g.view.scaleAndTranslate(h,20/h-b.x,20/h-b.y);k.appendChild(m);p.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
+h=Math.min(160/b.width,(h-40)/b.height);g.view.scaleAndTranslate(h,20/h-b.x,20/h-b.y);k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
 b.className="geBtn",m.appendChild(b));var u=function(b,g,c){var l=d.value,n=mxUtils.parseXml(l),l=mxUtils.getPrettyXml(n.documentElement),n=n.documentElement.getElementsByTagName("parsererror");if(null!=n&&0<n.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),n=!b.model.contains(g),!c||n||l!=q){l=a.editor.graph.compress(l);b.getModel().beginUpdate();try{if(n){var f=a.editor.graph.getInsertPoint();g.geometry.x=f.x;
-g.geometry.y=f.y;b.addCell(g)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+l+")",[g])}catch(E){throw E;}finally{b.getModel().endUpdate()}n&&b.setSelectionCell(g)}};b=mxUtils.button(mxResources.get("preview"),function(){u(g,n,!1)});b.className="geBtn";m.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";m.appendChild(b);a.editor.cancelFirst||m.appendChild(h);k.appendChild(m);p.appendChild(k);t.appendChild(p);this.container=
-t},CustomDialog=function(a,c,b,f,h,k,m,t){var p=document.createElement("div");p.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=m&&c.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});m.className="geBtn";t&&(m.style.display="none");a.editor.cancelFirst&&c.appendChild(m);a.isOffline()||null==k||(t=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),t.className="geBtn",c.appendChild(t));
-h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(m);p.appendChild(c);this.cancelBtn=m;this.okButton=h;this.container=p},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">'+
+g.geometry.y=f.y;b.addCell(g)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+l+")",[g])}catch(E){throw E;}finally{b.getModel().endUpdate()}n&&b.setSelectionCell(g)}};b=mxUtils.button(mxResources.get("preview"),function(){u(g,n,!1)});b.className="geBtn";m.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";m.appendChild(b);a.editor.cancelFirst||m.appendChild(h);k.appendChild(m);t.appendChild(k);p.appendChild(t);this.container=
+p},CustomDialog=function(a,c,b,f,h,k,m,p){var t=document.createElement("div");t.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=m&&c.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});m.className="geBtn";p&&(m.style.display="none");a.editor.cancelFirst&&c.appendChild(m);a.isOffline()||null==k||(p=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),p.className="geBtn",c.appendChild(p));
+h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(m);t.appendChild(c);this.cancelBtn=m;this.okButton=h;this.container=t},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">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+
 '</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+mxResources.get("myDiagrams",null,"My diagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+
 mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">&#x1F6C8; '+
 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>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
 var a=window.innerWidth,b=window.innerHeight,f=987,h=712;.9*a<f&&(f=Math.max(.9*a,600),c.style.width=f+"px");.9*b<h&&(h=Math.max(.9*b,300),c.style.height=h+"px");this.width=f;this.height=h;this.container=c};
-TemplatesDialog.prototype.init=function(a,c,b,f,h,k,m,t,p,d){function g(){null!=D&&(D.style.fontWeight="normal",D.style.textDecoration="none",D=null)}function n(a,b,d,g,c,l,n){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+g+"]").className="geTempDlgRadioBtn "+(n?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+d+"-sel.svg";B.querySelector("."+c).src="/images/"+
-l+".svg";return!0}function q(a){function b(a){Z.removeChild(g);B.removeChild(d);Z.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var d=document.createElement("div");d.className="geTempDlgDialogMask";B.appendChild(d);var g=document.createElement("div");g.className="geTempDlgDiagramPreviewBox";var c=document.createElement("img");c.src=a;g.appendChild(c);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));g.appendChild(a);var l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(d,"click",b);Z.appendChild(g);Z.scrollTop=0;g.style.lineHeight=g.clientHeight+"px"}function u(a,b,d){if(null!=H){for(var g=H.className.split(" "),c=0;c<g.length;c++)if(-1<g[c].indexOf("Active")){g.splice(c,1);break}H.className=g.join(" ")}null!=a?(H=a,H.className+=" "+b,I=d,M.className="geTempDlgCreateBtn"):(I=H=null,M.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function v(b){if(null!=I){var g=I;I=null;M.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";g.isExternal?(1==b?d(g.url,g,"nameInput.value"):p(g.url,g,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+g.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(a){a=a?"":"none";for(var b=B.querySelectorAll(".geTempDlgLinkToDiagram"),d=0;d<b.length;d++)b[d].style.display=
+TemplatesDialog.prototype.init=function(a,c,b,f,h,k,m,p,t,d){function g(){null!=D&&(D.style.fontWeight="normal",D.style.textDecoration="none",D=null)}function n(a,b,d,g,c,l,n){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+g+"]").className="geTempDlgRadioBtn "+(n?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+b).src="/images/"+d+"-sel.svg";C.querySelector("."+c).src="/images/"+
+l+".svg";return!0}function q(a){function b(a){Z.removeChild(g);C.removeChild(d);Z.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var d=document.createElement("div");d.className="geTempDlgDialogMask";C.appendChild(d);var g=document.createElement("div");g.className="geTempDlgDiagramPreviewBox";var c=document.createElement("img");c.src=a;g.appendChild(c);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));g.appendChild(a);var l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(d,"click",b);Z.appendChild(g);Z.scrollTop=0;g.style.lineHeight=g.clientHeight+"px"}function u(a,b,d){if(null!=F){for(var g=F.className.split(" "),c=0;c<g.length;c++)if(-1<g[c].indexOf("Active")){g.splice(c,1);break}F.className=g.join(" ")}null!=a?(F=a,F.className+=" "+b,I=d,M.className="geTempDlgCreateBtn"):(I=F=null,M.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function v(b){if(null!=I){var g=I;I=null;M.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";g.isExternal?(1==b?d(g.url,g,"nameInput.value"):t(g.url,g,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+g.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(a){a=a?"":"none";for(var b=C.querySelectorAll(".geTempDlgLinkToDiagram"),d=0;d<b.length;d++)b[d].style.display=
 a}function y(a,b,d){function g(){M.innerHTML=b?mxResources.get("create"):mxResources.get("copy");w(!b)}R.innerHTML="";u();N=a;var c=null;if(d){c=document.createElement("table");c.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),n=document.createElement("th");n.style.width="50%";n.innerHTML=mxResources.get("diagram",null,"Diagram");l.appendChild(n);n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("changedBy",null,"Changed By");l.appendChild(n);
-n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");l.appendChild(n);c.appendChild(l);R.appendChild(c)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var f=a[l].url,n=mxUtils.htmlEntities(a[l].title),A=a[l].tooltip||a[l].title,h=a[l].imgUrl,x=mxUtils.htmlEntities(a[l].changedBy||""),k=mxUtils.htmlEntities(a[l].lastModifiedOn||"");h||(h=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=d?50:15;null!=n&&n.length>f&&(n=n.substring(0,
-f)+"&hellip;");if(d){var E=document.createElement("tr"),h=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));h.appendChild(B);A=document.createElement("span");A.className="geTempDlgDiagramTitle";A.innerHTML=n;h.appendChild(A);E.appendChild(h);h=document.createElement("td");h.innerHTML=x;E.appendChild(h);h=document.createElement("td");h.innerHTML=k;E.appendChild(h);
-c.appendChild(E);null==H&&(g(),u(E,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(E,"click",function(){H!=b&&(g(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(E,"dblclick",v);mxEvent.addListener(B,"click",function(){q(a)})})(a[l],E)}else{var m=document.createElement("div");m.className="geTempDlgDiagramTile";m.setAttribute("title",A);null==H&&(g(),u(m,"geTempDlgDiagramTileActive",a[l]));x=document.createElement("div");x.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
-var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,x);y.src=h;x.appendChild(y);m.appendChild(x);x=document.createElement("div");x.className="geTempDlgDiagramTileLbl";x.innerHTML=null!=n?n:"";m.appendChild(x);B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";
-B.setAttribute("title",mxResources.get("preview"));m.appendChild(B);(function(a,b){mxEvent.addListener(m,"click",function(){H!=b&&(g(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(m,"dblclick",v);mxEvent.addListener(B,"click",function(){q(a)})})(a[l],m);R.appendChild(m)}}}function l(a,b){Q.innerHTML="";u();for(var d=!b&&5<a.length?5:a.length,g=0;g<d;g++){var c=a[g];c.isCategory=!0;var l=document.createElement("div"),n=mxResources.get(c.title);null==n&&(n=c.title.substring(0,1).toUpperCase()+
-c.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",n);n=mxUtils.htmlEntities(n);15<n.length&&(n=n.substring(0,15)+"&hellip;");null==H&&(M.innerHTML=mxResources.get("create"),w(),u(l,"geTempDlgNewDiagramCatItemActive",c));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var q=document.createElement("img");q.src=NEW_DIAGRAM_CATS_PATH+"/"+c.img;f.appendChild(q);l.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";
-f.innerHTML=n;l.appendChild(f);Q.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){H!=b&&(M.innerHTML=mxResources.get("create"),w(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(c,l)}T.style.display=5>a.length?"none":""}function x(a){var b=B.querySelector(".geTemplatesList"),d;for(d in a){var g=document.createElement("div"),c=mxResources.get(d),l=a[d];null==c&&(c=d.substring(0,1).toUpperCase()+d.substring(1));g.className="geTemplateCatLink";
-g.setAttribute("title",c+" ("+l.length+")");c=mxUtils.htmlEntities(c);15<c.length&&(c=c.substring(0,15)+"&hellip;");g.innerHTML=c+" ("+l.length+")";b.appendChild(g);(function(b,d,c){mxEvent.addListener(g,"click",function(){D!=c&&(null!=D?(D.style.fontWeight="normal",D.style.textDecoration="none"):(O.style.display="none",aa.style.minHeight="100%"),D=c,D.style.fontWeight="bold",D.style.textDecoration="underline",Z.scrollTop=0,z&&(G=!0),V.innerHTML=d,Y.style.display="none",y(a[b],!0))})})(d,c,g)}}function A(a){m&&
-(Z.scrollTop=0,R.innerHTML="",X.spin(R),G=!1,z=!0,V.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),L=null,m(da,a?null:k))}function E(a){g();Z.scrollTop=0;R.innerHTML="";X.spin(R);G=!1;z=!0;W=null;V.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';t(a,da,F?null:k);L=a}f=null!=f?f:TEMPLATE_PATH+"/index.xml";h=null!=h?h:NEW_DIAGRAM_CATS_PATH+"/index.xml";var B=this.container,z=!1,G=!1,D=null,H=null,I=null,C=!1,F=!0,J=!1,N=[],L,T=B.querySelector(".geTempDlgShowAllBtn"),
-R=B.querySelector(".geTempDlgDiagramsTiles"),V=B.querySelector(".geTempDlgDiagramsListTitle"),Y=B.querySelector(".geTempDlgDiagramsListBtns"),Z=B.querySelector(".geTempDlgContent"),aa=B.querySelector(".geTempDlgDiagramsList"),O=B.querySelector(".geTempDlgNewDiagramCat"),Q=B.querySelector(".geTempDlgNewDiagramCatList"),M=B.querySelector(".geTempDlgCreateBtn"),X=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(B.querySelector(".geTempDlgNewDiagramlbl"),
-"click",function(){g();O.style.display="";aa.style.minHeight="calc(100% - 280px)";A(F)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){n(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(F=!0,null==L?A(F):E(L))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){n(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
-"all-diagrams",!0)&&(F=!1,null==L?A(F):E(L))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){n(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(J=!0,y(N,!1,J))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){n(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(J=!1,y(N,!1,J))});mxEvent.addListener(T,"click",function(){C?(O.style.height="280px",
-Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),l(ba)):(O.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),l(ba,!0));C=!C});var P=!1,U=!1,S={},ba=[],K=1;mxUtils.get(f,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=b.indexOf("/"),b=b.substring(0,d),d=S[b];null==d&&(K++,d=[],S[b]=d);d.push({url:a.getAttribute("url"),
-libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}x(S)}});mxUtils.get(h,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;l(ba)}});var da=function(a,b){Y.style.display="";X.stop();z=!1;G?G=!1:b?R.innerHTML=
-b:0==a.length?R.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,J)};A(F);var W=null;t&&mxEvent.addListener(B.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?E(b.value):W=setTimeout(function(){E(b.value)},500)});mxEvent.addListener(M,"click",v);mxEvent.addListener(B.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(B.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
+n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");l.appendChild(n);c.appendChild(l);R.appendChild(c)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var f=a[l].url,n=mxUtils.htmlEntities(a[l].title),z=a[l].tooltip||a[l].title,h=a[l].imgUrl,x=mxUtils.htmlEntities(a[l].changedBy||""),k=mxUtils.htmlEntities(a[l].lastModifiedOn||"");h||(h=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=d?50:15;null!=n&&n.length>f&&(n=n.substring(0,
+f)+"&hellip;");if(d){var E=document.createElement("tr"),h=document.createElement("td"),m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramListPreviewBtn";m.setAttribute("title",mxResources.get("preview"));h.appendChild(m);z=document.createElement("span");z.className="geTempDlgDiagramTitle";z.innerHTML=n;h.appendChild(z);E.appendChild(h);h=document.createElement("td");h.innerHTML=x;E.appendChild(h);h=document.createElement("td");h.innerHTML=k;E.appendChild(h);
+c.appendChild(E);null==F&&(g(),u(E,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(E,"click",function(){F!=b&&(g(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(E,"dblclick",v);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],E)}else{var C=document.createElement("div");C.className="geTempDlgDiagramTile";C.setAttribute("title",z);null==F&&(g(),u(C,"geTempDlgDiagramTileActive",a[l]));x=document.createElement("div");x.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,x);y.src=h;x.appendChild(y);C.appendChild(x);x=document.createElement("div");x.className="geTempDlgDiagramTileLbl";x.innerHTML=null!=n?n:"";C.appendChild(x);m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramPreviewBtn";
+m.setAttribute("title",mxResources.get("preview"));C.appendChild(m);(function(a,b){mxEvent.addListener(C,"click",function(){F!=b&&(g(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(C,"dblclick",v);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],C);R.appendChild(C)}}}function l(a,b){Q.innerHTML="";u();for(var d=!b&&5<a.length?5:a.length,g=0;g<d;g++){var c=a[g];c.isCategory=!0;var l=document.createElement("div"),n=mxResources.get(c.title);null==n&&(n=c.title.substring(0,1).toUpperCase()+
+c.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",n);n=mxUtils.htmlEntities(n);15<n.length&&(n=n.substring(0,15)+"&hellip;");null==F&&(M.innerHTML=mxResources.get("create"),w(),u(l,"geTempDlgNewDiagramCatItemActive",c));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var q=document.createElement("img");q.src=NEW_DIAGRAM_CATS_PATH+"/"+c.img;f.appendChild(q);l.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";
+f.innerHTML=n;l.appendChild(f);Q.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(M.innerHTML=mxResources.get("create"),w(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(c,l)}T.style.display=5>a.length?"none":""}function x(a){var b=C.querySelector(".geTemplatesList"),d;for(d in a){var g=document.createElement("div"),c=mxResources.get(d),l=a[d];null==c&&(c=d.substring(0,1).toUpperCase()+d.substring(1));g.className="geTemplateCatLink";
+g.setAttribute("title",c+" ("+l.length+")");c=mxUtils.htmlEntities(c);15<c.length&&(c=c.substring(0,15)+"&hellip;");g.innerHTML=c+" ("+l.length+")";b.appendChild(g);(function(b,d,c){mxEvent.addListener(g,"click",function(){D!=c&&(null!=D?(D.style.fontWeight="normal",D.style.textDecoration="none"):(O.style.display="none",aa.style.minHeight="100%"),D=c,D.style.fontWeight="bold",D.style.textDecoration="underline",Z.scrollTop=0,A&&(H=!0),V.innerHTML=d,Y.style.display="none",y(a[b],!0))})})(d,c,g)}}function z(a){m&&
+(Z.scrollTop=0,R.innerHTML="",X.spin(R),H=!1,A=!0,V.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),L=null,m(da,a?null:k))}function E(a){g();Z.scrollTop=0;R.innerHTML="";X.spin(R);H=!1;A=!0;W=null;V.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';p(a,da,G?null:k);L=a}f=null!=f?f:TEMPLATE_PATH+"/index.xml";h=null!=h?h:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,A=!1,H=!1,D=null,F=null,I=null,B=!1,G=!0,J=!1,N=[],L,T=C.querySelector(".geTempDlgShowAllBtn"),
+R=C.querySelector(".geTempDlgDiagramsTiles"),V=C.querySelector(".geTempDlgDiagramsListTitle"),Y=C.querySelector(".geTempDlgDiagramsListBtns"),Z=C.querySelector(".geTempDlgContent"),aa=C.querySelector(".geTempDlgDiagramsList"),O=C.querySelector(".geTempDlgNewDiagramCat"),Q=C.querySelector(".geTempDlgNewDiagramCatList"),M=C.querySelector(".geTempDlgCreateBtn"),X=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(C.querySelector(".geTempDlgNewDiagramlbl"),
+"click",function(){g();O.style.display="";aa.style.minHeight="calc(100% - 280px)";z(G)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){n(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(G=!0,null==L?z(G):E(L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){n(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
+"all-diagrams",!0)&&(G=!1,null==L?z(G):E(L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){n(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(J=!0,y(N,!1,J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){n(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(J=!1,y(N,!1,J))});mxEvent.addListener(T,"click",function(){B?(O.style.height="280px",
+Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),l(ba)):(O.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),l(ba,!0));B=!B});var P=!1,U=!1,S={},ba=[],K=1;mxUtils.get(f,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=b.indexOf("/"),b=b.substring(0,d),d=S[b];null==d&&(K++,d=[],S[b]=d);d.push({url:a.getAttribute("url"),
+libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}x(S)}});mxUtils.get(h,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;l(ba)}});var da=function(a,b){Y.style.display="";X.stop();A=!1;H?H=!1:b?R.innerHTML=
+b:0==a.length?R.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,J)};z(G);var W=null;p&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?E(b.value):W=setTimeout(function(){E(b.value)},500)});mxEvent.addListener(M,"click",v);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
 b&&b();a.hideDialog(!0)})};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
 IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
 IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -7773,7 +7773,7 @@ b.getElementsByTagName("parsererror");if(null!=d&&0<d.length){var d=d[0],g=d.get
 else if(g=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=g){var c=new mxCodec(g.ownerDocument);c.decode(g,this.graph.getStylesheet())}this.graph.currentStyle=d;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");d=b.getAttribute("backgroundImage");null!=d?(d=JSON.parse(d),this.graph.setBackgroundImage(new mxImage(d.src,d.width,d.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&
 !this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=c.apply(this,
 arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return b};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(null!=b&&"<"!=
-b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var d=mxUtils.parseXml(b).documentElement;return"mxfile"==d.nodeName||"mxGraphModel"==d.nodeName}}catch(z){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var d=a.ownerDocument.getElementsByTagName("div"),g=[];if(null!=d&&0<d.length)for(var c=0;c<d.length;c++)if("mxgraph"==d[c].getAttribute("class")){g.push(d[c]);
+b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var d=mxUtils.parseXml(b).documentElement;return"mxfile"==d.nodeName||"mxGraphModel"==d.nodeName}}catch(A){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var d=a.ownerDocument.getElementsByTagName("div"),g=[];if(null!=d&&0<d.length)for(var c=0;c<d.length;c++)if("mxgraph"==d[c].getAttribute("class")){g.push(d[c]);
 break}0<g.length&&(d=g[0].getAttribute("data-mxgraph"),null!=d?(g=JSON.parse(d),null!=g&&null!=g.xml&&(g=mxUtils.parseXml(g.xml),a=g.documentElement)):(g=g[0].getElementsByTagName("div"),0<g.length&&(d=mxUtils.getTextContent(g[0]),d=this.graph.decompress(d),0<d.length&&(g=mxUtils.parseXml(d),a=g.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(d=a.getAttribute("content"),null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&
 (d=decodeURIComponent(d)),null!=d&&0<d.length)a=mxUtils.parseXml(d).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(g=null,"diagram"==a.nodeName?g=a:"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),0<d.length&&(g=d[Math.max(0,Math.min(d.length-1,urlParams.page||0))])),null!=g&&(d=this.graph.decompress(mxUtils.getTextContent(g)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||
 (a=null);return a};var b=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();b.apply(this,arguments)};var f=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
@@ -7783,8 +7783,8 @@ MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJax
 b){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var g=document.getElementsByTagName("script");if(null!=g&&0<g.length){var c=document.createElement("script");c.type="text/javascript";c.src=a;g[0].parentNode.appendChild(c)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
 var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,d,g,c){void 0!==d?b.push(d.replace(/\\'/g,"'")):void 0!==g?b.push(g.replace(/\\"/g,'"')):void 0!==c&&b.push(c);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
 var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var d=null;null!=a.editor.graph.getModel().getParent(b)?d=b.getId():null!=a.currentPage&&(d=a.currentPage.getId());return d});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 t=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?t.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 b=this.editorUi,d=b.editor.graph,g=this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){var g=new ChangePageSetup(b);g.ignoreColor=!0;g.ignoreImage=!0;g.shadowVisible=a;d.model.execute(g)},{install:function(a){this.listener=function(){a(d.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});
+this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?p.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 t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(a){a=t.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,d=b.editor.graph,g=this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){var g=new ChangePageSetup(b);g.ignoreColor=!0;g.ignoreImage=!0;g.shadowVisible=a;d.model.execute(g)},{install:function(a){this.listener=function(){a(d.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});
 Editor.shadowOptionEnabled||(g.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(g,60));a.appendChild(g)}return a};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi,g=b.editor.graph;if(g.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
 {install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}if(this.isMathOptionVisible()&&g.isEnabled()&&"undefined"!==typeof MathJax){c=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return g.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(g.mathEnabled)};b.addListener("mathEnabledChanged",
 this.listener)},destroy:function(){b.removeListener(this.listener)}});c.style.paddingTop="5px";a.appendChild(c);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";c.appendChild(l)}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",
@@ -7817,15 +7817,15 @@ d.size&&(n=n.slice(0,d.size));b=n.join(",");null!=d.countProperty&&(h.setCellSty
 c.push(d.dependentProps[a]);l.push(u)}w.editorUi.fireEvent(new mxEventObject("styleChanged","keys",c,"values",l,"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}}function c(b,d,g){var c=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=l.x-c.x+"px";d.style.top=l.y-c.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(g?4:0)+"px";d.style.zIndex=5}function l(a,b,d){var c=document.createElement("div");c.style.width="32px";c.style.height=
 "4px";c.style.margin="2px";c.style.border="1px solid black";c.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(w,function(l){this.editorUi.pickColor(b,function(b){c.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;g(a,b,d)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(c);return btn}function n(a,b,d,c,l,n,f){null!=b&&(b=b.split(","),x.push({name:a,
 values:b,type:d,defVal:c,countProperty:l,parentRow:n,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(w,function(b){for(var q=n,w=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==a)q=q.nextSibling,w++;else break;var h={type:d,parentRow:n,index:w,isDeletable:!0,defVal:c,countProperty:l},w=u(a,"",h,0==w%2,f);g(a,c,h);q.parentNode.insertBefore(w,q.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function f(a,b,d,g,c,l,n){if(0<c){var f=Array(c);b=null!=b?b.split(","):[];for(var q=0;q<c;q++)f[q]=null!=b[q]?b[q]:null!=g?g:"";x.push({name:a,values:f,type:d,defVal:g,parentRow:l,flipBkg:n,size:c})}return document.createElement("div")}function q(a,b,d){var c=document.createElement("input");c.type="checkbox";c.checked="1"==b;mxEvent.addListener(c,"change",function(){g(a,c.checked?"1":"0",d)});return c}function u(b,d,u,h,k){var x=u.dispName,v=u.type,A=document.createElement("tr");A.className="gePropRow"+
-(k?"Dark":"")+(h?"Alt":"")+" gePropNonHeaderRow";A.setAttribute("data-pName",b);A.setAttribute("data-pValue",d);h=!1;null!=u.index&&(A.setAttribute("data-index",u.index),x=(null!=x?x:"")+"["+u.index+"]",h=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));h&&(m.style.textAlign="right");A.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==v)m.appendChild(l(b,d,u));else if("bool"==v||"boolean"==
-v)m.appendChild(q(b,d,u));else if("enum"==v){var E=u.enumList;for(k=0;k<E.length;k++)if(x=E[k],x.val==d){m.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(m,"click",mxUtils.bind(w,function(){var l=document.createElement("select");c(m,l);for(var n=0;n<E.length;n++){var f=E[n],q=document.createElement("option");q.value=mxUtils.htmlEntities(f.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));l.appendChild(q)}l.value=
-d;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);g(b,a,u)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==v?m.appendChild(n(b,d,u.subType,u.subDefVal,u.countProperty,A,k)):"staticArr"==v?m.appendChild(f(b,d,u.subType,u.subDefVal,u.size,A,k)):(m.innerHTML=d,mxEvent.addListener(m,"click",mxUtils.bind(w,function(){function l(){var a=n.value,a=0==a.length&&"string"!=v?0:a;u.allowAuto&&("auto"==a.trim().toLowerCase()?
-(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=u.min&&a<u.min?a=u.min:null!=u.max&&a>u.max&&(a=u.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");g(b,a,u)}var n=document.createElement("input");c(m,n,!0);n.value=d;n.className="gePropEditor";"int"!=v&&"float"!=v||u.allowAuto||(n.type="number",n.step="int"==v?"1":"any",null!=u.min&&(n.min=parseFloat(u.min)),null!=u.max&&(n.max=parseFloat(u.max)));a.appendChild(n);mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&l()});
-n.focus();mxEvent.addListener(n,"blur",function(){l()})})));u.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(w,function(a){g(b,"",u,u.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",m.appendChild(k));A.appendChild(m);return A}var w=this,h=this.editorUi.editor.graph,x=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var k=document.createElement("tr");
-k.className="gePropHeader";var A=document.createElement("th");A.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;A.appendChild(m);mxUtils.write(A,mxResources.get("property"));k.style.cursor="pointer";var E=function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(w.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;d="none";for(var g=a.childNodes.length-1;0<=g;g--)try{var c=a.childNodes[g],l=c.nodeName.toUpperCase();"INPUT"!=
-l&&"SELECT"!=l||a.removeChild(c)}catch(ga){}}else m.src=Sidebar.prototype.expandedImage,d="";for(g=0;g<b.length;g++)b[g].style.display=d};mxEvent.addListener(k,"click",function(){w.editorUi.propertiesCollapsed=!w.editorUi.propertiesCollapsed;E()});k.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value");k.appendChild(A);v.appendChild(k);var y=!1,B=!1,t;for(t in b)if(k=b[t],"function"!=typeof k.isVisible||k.isVisible(d)){var p=null!=d.style[t]?
-mxUtils.htmlEntities(d.style[t]+""):k.defVal;if("separator"==k.type)B=!B;else{if("staticArr"==k.type)k.size=parseInt(d.style[k.sizeProperty]||b[k.sizeProperty].defVal)||0;else if(null!=k.dependentProps){for(var X=k.dependentProps,P=[],U=[],A=0;A<X.length;A++){var S=d.style[X[A]];U.push(b[X[A]].subDefVal);P.push(null!=S?S.split(","):[])}k.dependentPropsDefVal=U;k.dependentPropsVals=P}v.appendChild(u(t,p,k,y,B));y=!y}}for(A=0;A<x.length;A++)for(k=x[A],b=k.parentRow,d=0;d<k.values.length;d++)t=u(k.name,
+function f(a,b,d,g,c,l,n){if(0<c){var f=Array(c);b=null!=b?b.split(","):[];for(var q=0;q<c;q++)f[q]=null!=b[q]?b[q]:null!=g?g:"";x.push({name:a,values:f,type:d,defVal:g,parentRow:l,flipBkg:n,size:c})}return document.createElement("div")}function q(a,b,d){var c=document.createElement("input");c.type="checkbox";c.checked="1"==b;mxEvent.addListener(c,"change",function(){g(a,c.checked?"1":"0",d)});return c}function u(b,d,u,h,k){var x=u.dispName,v=u.type,m=document.createElement("tr");m.className="gePropRow"+
+(k?"Dark":"")+(h?"Alt":"")+" gePropNonHeaderRow";m.setAttribute("data-pName",b);m.setAttribute("data-pValue",d);h=!1;null!=u.index&&(m.setAttribute("data-index",u.index),x=(null!=x?x:"")+"["+u.index+"]",h=!0);var z=document.createElement("td");z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));h&&(z.style.textAlign="right");m.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(l(b,d,u));else if("bool"==v||"boolean"==
+v)z.appendChild(q(b,d,u));else if("enum"==v){var E=u.enumList;for(k=0;k<E.length;k++)if(x=E[k],x.val==d){z.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(w,function(){var l=document.createElement("select");c(z,l);for(var n=0;n<E.length;n++){var f=E[n],q=document.createElement("option");q.value=mxUtils.htmlEntities(f.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));l.appendChild(q)}l.value=
+d;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);g(b,a,u)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==v?z.appendChild(n(b,d,u.subType,u.subDefVal,u.countProperty,m,k)):"staticArr"==v?z.appendChild(f(b,d,u.subType,u.subDefVal,u.size,m,k)):(z.innerHTML=d,mxEvent.addListener(z,"click",mxUtils.bind(w,function(){function l(){var a=n.value,a=0==a.length&&"string"!=v?0:a;u.allowAuto&&("auto"==a.trim().toLowerCase()?
+(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=u.min&&a<u.min?a=u.min:null!=u.max&&a>u.max&&(a=u.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");g(b,a,u)}var n=document.createElement("input");c(z,n,!0);n.value=d;n.className="gePropEditor";"int"!=v&&"float"!=v||u.allowAuto||(n.type="number",n.step="int"==v?"1":"any",null!=u.min&&(n.min=parseFloat(u.min)),null!=u.max&&(n.max=parseFloat(u.max)));a.appendChild(n);mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&l()});
+n.focus();mxEvent.addListener(n,"blur",function(){l()})})));u.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(w,function(a){g(b,"",u,u.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",z.appendChild(k));m.appendChild(z);return m}var w=this,h=this.editorUi.editor.graph,x=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var k=document.createElement("tr");
+k.className="gePropHeader";var m=document.createElement("th");m.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;m.appendChild(z);mxUtils.write(m,mxResources.get("property"));k.style.cursor="pointer";var E=function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(w.editorUi.propertiesCollapsed){z.src=Sidebar.prototype.collapsedImage;d="none";for(var g=a.childNodes.length-1;0<=g;g--)try{var c=a.childNodes[g],l=c.nodeName.toUpperCase();"INPUT"!=
+l&&"SELECT"!=l||a.removeChild(c)}catch(ga){}}else z.src=Sidebar.prototype.expandedImage,d="";for(g=0;g<b.length;g++)b[g].style.display=d};mxEvent.addListener(k,"click",function(){w.editorUi.propertiesCollapsed=!w.editorUi.propertiesCollapsed;E()});k.appendChild(m);m=document.createElement("th");m.className="gePropHeaderCell";m.innerHTML=mxResources.get("value");k.appendChild(m);v.appendChild(k);var y=!1,C=!1,t;for(t in b)if(k=b[t],"function"!=typeof k.isVisible||k.isVisible(d)){var p=null!=d.style[t]?
+mxUtils.htmlEntities(d.style[t]+""):k.defVal;if("separator"==k.type)C=!C;else{if("staticArr"==k.type)k.size=parseInt(d.style[k.sizeProperty]||b[k.sizeProperty].defVal)||0;else if(null!=k.dependentProps){for(var X=k.dependentProps,P=[],U=[],m=0;m<X.length;m++){var S=d.style[X[m]];U.push(b[X[m]].subDefVal);P.push(null!=S?S.split(","):[])}k.dependentPropsDefVal=U;k.dependentPropsVals=P}v.appendChild(u(t,p,k,y,C));y=!y}}for(m=0;m<x.length;m++)for(k=x[m],b=k.parentRow,d=0;d<k.values.length;d++)t=u(k.name,
 k.values[d],{type:k.type,parentRow:k.parentRow,isDeletable:k.isDeletable,index:d,defVal:k.defVal,countProperty:k.countProperty,size:k.size},0==d%2,k.flipBkg),b.parentNode.insertBefore(t,b.nextSibling),b=t;a.appendChild(v);E();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){g.getModel().beginUpdate();try{var d=g.getSelectionCells();for(b=0;b<d.length;b++){for(var c=g.getModel().getStyle(d[b]),n=0;n<l.length;n++)c=mxUtils.removeStylename(c,
 l[n]);var f=g.getModel().isVertex(d[b])?g.defaultVertexStyle:g.defaultEdgeStyle;null!=a?(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),g.getModel().isVertex(d[b])&&(c=mxUtils.setStyle(c,mxConstants.STYLE_FONTCOLOR,
 a.font||mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null)))):(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,"#ffffff")),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,"#000000")),c=mxUtils.setStyle(c,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),g.getModel().isVertex(d[b])&&(c=mxUtils.setStyle(c,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,
@@ -7842,7 +7842,7 @@ function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("ti
 this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):d.apply(this,arguments)};var g=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if(null!=b){if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var d=new mxStackLayout(this.graph,!1);d.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var d=b.height%20;b.height+=10<d?20-d:-d}this.graph.getModel().setGeometry(a,
 b)};d.fill=!0;d.unitSize=mxRackContainer.unitSize|20;d.marginLeft=b.marginLeft||0;d.marginRight=b.marginRight||0;d.marginTop=b.marginTop||0;d.marginBottom=b.marginBottom||0;d.resizeParent=!1;return d}if("undefined"!=typeof mxTableLayout&&"tableLayout"==b.childLayout)return d=new mxTableLayout(this.graph),d.rows=b.tableRows||2,d.columns=b.tableColumns||2,d.colPercentages=b.colPercentages,d.rowPercentages=b.rowPercentages,d.equalColumns="1"==mxUtils.getValue(b,"equalColumns",d.colPercentages?"0":"1"),
 d.equalRows="1"==mxUtils.getValue(b,"equalRows",d.rowPercentages?"0":"1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.border=b.tableBorder||d.border,d.marginLeft=b.marginLeft||0,d.marginRight=b.marginRight||0,d.marginTop=b.marginTop||0,d.marginBottom=b.marginBottom||0,d.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),d.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",d.autoAddCol?"0":"1"),d.colWidths=b.colWidths||"100",d.rowHeights=b.rowHeights||"50",d}return g.apply(this,arguments)}};
-var u=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return u.apply(this,arguments)&&!mxClient.IS_SF};var v=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=v.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}null!=this.globalUrlVars&&(b=
+var u=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return u.apply(this,arguments)&&!mxClient.IS_SF};var v=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=v.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(C){null!=window.console&&console.log("Error in vars URL parameter: "+C)}null!=this.globalUrlVars&&(b=
 this.globalUrlVars[a])}return b};var w=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){w.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 y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
 function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++)if(null!=a.actions[b].open)if(this.isCustomLink(a.actions[b].open)){if(!this.customLinkClicked(a.actions[b].open))return}else this.openLink(a.actions[b].open);this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)this.handleLinkAction(a.actions[b])}finally{this.model.endUpdate()}}};
@@ -7864,29 +7864,29 @@ mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarku
 mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.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.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
 STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,
-5)&&(b="mxgraph.sysml"));return b};var l=mxMarker.createMarker;mxMarker.createMarker=function(a,b,d,g,c,n,f,q,u,h){if(null!=d&&null==mxMarker.markers[d]){var w=this.getPackageForType(d);null!=w&&mxStencilRegistry.getStencil(w)}return l.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function d(){v.value=Math.max(1,Math.min(f,Math.max(parseInt(v.value),parseInt(k.value))));k.value=Math.max(1,Math.min(f,Math.min(parseInt(v.value),parseInt(k.value))))}function g(b){function d(b,d,c){var l=
-b.getGraphBounds(),n=0,f=0,q=W.get(),u=1/b.pageScale,h=A.checked;if(h)var u=parseInt(K.value),w=parseInt(da.value),u=Math.min(q.height*w/(l.height/b.view.scale),q.width*u/(l.width/b.view.scale));else u=parseInt(y.value)/(100*b.pageScale),isNaN(u)&&(g=1/b.pageScale,y.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*g);q.height=Math.ceil(q.height*g);u*=g;!h&&b.pageVisible?(l=b.getPageLayout(),n-=l.x*q.width,f-=l.y*q.height):h=!0;if(null==d){d=PrintDialog.createPrintPreview(b,
+5)&&(b="mxgraph.sysml"));return b};var l=mxMarker.createMarker;mxMarker.createMarker=function(a,b,d,g,c,n,f,q,u,w){if(null!=d&&null==mxMarker.markers[d]){var h=this.getPackageForType(d);null!=h&&mxStencilRegistry.getStencil(h)}return l.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function d(){v.value=Math.max(1,Math.min(f,Math.max(parseInt(v.value),parseInt(k.value))));k.value=Math.max(1,Math.min(f,Math.min(parseInt(v.value),parseInt(k.value))))}function g(b){function d(b,d,c){var l=
+b.getGraphBounds(),n=0,f=0,q=W.get(),u=1/b.pageScale,h=z.checked;if(h)var u=parseInt(K.value),w=parseInt(da.value),u=Math.min(q.height*w/(l.height/b.view.scale),q.width*u/(l.width/b.view.scale));else u=parseInt(y.value)/(100*b.pageScale),isNaN(u)&&(g=1/b.pageScale,y.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*g);q.height=Math.ceil(q.height*g);u*=g;!h&&b.pageVisible?(l=b.getPageLayout(),n-=l.x*q.width,f-=l.y*q.height):h=!0;if(null==d){d=PrintDialog.createPrintPreview(b,
 u,q,0,n,f,h);d.pageSelector=!1;d.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(d.title=b.getTitle());var k=d.writeHead;d.writeHead=function(b){k.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var x=d.renderPage;d.renderPage=function(a,b,d,g,c,l){var n=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var f=x.apply(this,
-arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}d.open(null,null,c,!0)}else{q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";d.backgroundColor=q;d.autoOrigin=h;d.appendGraph(b,u,n,f,c,!0)}return d}var g=parseInt(ea.value)/100;isNaN(g)&&(g=1,ea.value="100 %");var g=.75*g,l=k.value,n=v.value,f=!w.checked,u=null;f&&(f=l==q&&n==q);if(!f&&null!=a.pages&&a.pages.length){var h=0,f=a.pages.length-1;w.checked||
-(h=parseInt(l)-1,f=parseInt(n)-1);for(var x=h;x<=f;x++){var m=a.pages[x],l=m==a.currentPage?c:null;if(null==l){var l=a.createTemporaryGraph(c.getStylesheet()),n=!0,h=!1,t=null,E=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(n=m.viewState.pageVisible,h=m.viewState.mathEnabled,t=m.viewState.background,E=m.viewState.backgroundImage);l.background=t;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=n;l.mathEnabled=h;var p=l.getGlobalVariable;
-l.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?x+1:p.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(m);l.model.setRoot(m.root)}u=d(l,u,x!=f);l!=c&&l.container.parentNode.removeChild(l.container)}}else u=d(c);u.mathEnabled&&(f=u.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}d.open(null,null,c,!0)}else{q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";d.backgroundColor=q;d.autoOrigin=h;d.appendGraph(b,u,n,f,c,!0)}return d}var g=parseInt(ea.value)/100;isNaN(g)&&(g=1,ea.value="100 %");var g=.75*g,l=k.value,n=v.value,f=!h.checked,u=null;f&&(f=l==q&&n==q);if(!f&&null!=a.pages&&a.pages.length){var w=0,f=a.pages.length-1;h.checked||
+(w=parseInt(l)-1,f=parseInt(n)-1);for(var x=w;x<=f;x++){var m=a.pages[x],l=m==a.currentPage?c:null;if(null==l){var l=a.createTemporaryGraph(c.getStylesheet()),n=!0,w=!1,t=null,p=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(n=m.viewState.pageVisible,w=m.viewState.mathEnabled,t=m.viewState.background,p=m.viewState.backgroundImage);l.background=t;l.backgroundImage=null!=p?new mxImage(p.src,p.width,p.height):null;l.pageVisible=n;l.mathEnabled=w;var E=l.getGlobalVariable;
+l.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?x+1:E.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(m);l.model.setRoot(m.root)}u=d(l,u,x!=f);l!=c&&l.container.parentNode.removeChild(l.container)}}else u=d(c);u.mathEnabled&&(f=u.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
 f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),f.writeln('"HTML-CSS": {'),f.writeln("imageFont: null"),f.writeln("},"),f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),b&&(f.writeln("MathJax.Hub.Queue(function () {"),
 f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),f.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));u.closeDocument();!u.mathEnabled&&b&&PrintDialog.printPreview(u)}var c=a.editor.graph,l=document.createElement("div"),n=document.createElement("h3");n.style.width="100%";n.style.textAlign="center";n.style.marginTop="0px";mxUtils.write(n,b||mxResources.get("print"));l.appendChild(n);var f=1,q=1,u=document.createElement("div");
-u.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var w=document.createElement("input");w.style.cssText="margin-right:8px;margin-bottom:8px;";w.setAttribute("value","all");w.setAttribute("type","radio");w.setAttribute("name","pages-printdialog");u.appendChild(w);n=document.createElement("span");mxUtils.write(n,mxResources.get("printAllPages"));u.appendChild(n);mxUtils.br(u);var h=w.cloneNode(!0);w.setAttribute("checked","checked");h.setAttribute("value","range");
-u.appendChild(h);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");u.appendChild(n);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";u.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("to"));u.appendChild(n);var v=k.cloneNode(!0);u.appendChild(v);mxEvent.addListener(k,"focus",function(){h.checked=!0});mxEvent.addListener(v,
-"focus",function(){h.checked=!0});mxEvent.addListener(k,"change",d);mxEvent.addListener(v,"change",d);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(n=0;n<a.pages.length;n++)if(a.currentPage==a.pages[n]){q=n+1;k.value=q;v.value=q;break}k.setAttribute("max",f);v.setAttribute("max",f);1<f&&l.appendChild(u);var x=document.createElement("div");x.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type",
-"radio");m.setAttribute("name","printZoom");x.appendChild(m);n=document.createElement("span");mxUtils.write(n,mxResources.get("adjustTo"));x.appendChild(n);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);mxEvent.addListener(y,"focus",function(){m.checked=!0});l.appendChild(x);var u=u.cloneNode(!1),A=m.cloneNode(!0);A.setAttribute("value","fit");m.setAttribute("checked","checked");n=document.createElement("div");
-n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";n.appendChild(A);u.appendChild(n);x=document.createElement("table");x.style.display="inline-block";var t=document.createElement("tbody"),E=document.createElement("tr"),p=E.cloneNode(!0),M=document.createElement("td"),X=M.cloneNode(!0),P=M.cloneNode(!0),U=M.cloneNode(!0),S=M.cloneNode(!0),ba=M.cloneNode(!0);M.style.textAlign="right";U.style.textAlign="right";mxUtils.write(M,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";X.appendChild(K);n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsAcross"));P.appendChild(n);mxUtils.write(U,mxResources.get("fitToBy"));var da=K.cloneNode(!0);S.appendChild(da);mxEvent.addListener(K,"focus",function(){A.checked=!0});mxEvent.addListener(da,"focus",function(){A.checked=!0});n=document.createElement("span");mxUtils.write(n,
-mxResources.get("fitToSheetsDown"));ba.appendChild(n);E.appendChild(M);E.appendChild(X);E.appendChild(P);p.appendChild(U);p.appendChild(S);p.appendChild(ba);t.appendChild(E);t.appendChild(p);x.appendChild(t);u.appendChild(x);l.appendChild(u);u=document.createElement("div");n=document.createElement("div");n.style.fontWeight="bold";n.style.marginBottom="12px";mxUtils.write(n,mxResources.get("paperSize"));u.appendChild(n);n=document.createElement("div");n.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(n,
+u.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","all");h.setAttribute("type","radio");h.setAttribute("name","pages-printdialog");u.appendChild(h);n=document.createElement("span");mxUtils.write(n,mxResources.get("printAllPages"));u.appendChild(n);mxUtils.br(u);var w=h.cloneNode(!0);h.setAttribute("checked","checked");w.setAttribute("value","range");
+u.appendChild(w);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");u.appendChild(n);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";u.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("to"));u.appendChild(n);var v=k.cloneNode(!0);u.appendChild(v);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(v,
+"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",d);mxEvent.addListener(v,"change",d);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(n=0;n<a.pages.length;n++)if(a.currentPage==a.pages[n]){q=n+1;k.value=q;v.value=q;break}k.setAttribute("max",f);v.setAttribute("max",f);1<f&&l.appendChild(u);var x=document.createElement("div");x.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type",
+"radio");m.setAttribute("name","printZoom");x.appendChild(m);n=document.createElement("span");mxUtils.write(n,mxResources.get("adjustTo"));x.appendChild(n);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);mxEvent.addListener(y,"focus",function(){m.checked=!0});l.appendChild(x);var u=u.cloneNode(!1),z=m.cloneNode(!0);z.setAttribute("value","fit");m.setAttribute("checked","checked");n=document.createElement("div");
+n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";n.appendChild(z);u.appendChild(n);x=document.createElement("table");x.style.display="inline-block";var t=document.createElement("tbody"),p=document.createElement("tr"),E=p.cloneNode(!0),M=document.createElement("td"),X=M.cloneNode(!0),P=M.cloneNode(!0),U=M.cloneNode(!0),S=M.cloneNode(!0),ba=M.cloneNode(!0);M.style.textAlign="right";U.style.textAlign="right";mxUtils.write(M,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";X.appendChild(K);n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsAcross"));P.appendChild(n);mxUtils.write(U,mxResources.get("fitToBy"));var da=K.cloneNode(!0);S.appendChild(da);mxEvent.addListener(K,"focus",function(){z.checked=!0});mxEvent.addListener(da,"focus",function(){z.checked=!0});n=document.createElement("span");mxUtils.write(n,
+mxResources.get("fitToSheetsDown"));ba.appendChild(n);p.appendChild(M);p.appendChild(X);p.appendChild(P);E.appendChild(U);E.appendChild(S);E.appendChild(ba);t.appendChild(p);t.appendChild(E);x.appendChild(t);u.appendChild(x);l.appendChild(u);u=document.createElement("div");n=document.createElement("div");n.style.fontWeight="bold";n.style.marginBottom="12px";mxUtils.write(n,mxResources.get("paperSize"));u.appendChild(n);n=document.createElement("div");n.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(n,
 "printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);u.appendChild(n);n=document.createElement("span");mxUtils.write(n,mxResources.get("pageScale"));u.appendChild(n);var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","100 %");ea.style.width="60px";u.appendChild(ea);l.appendChild(u);n=document.createElement("div");n.style.cssText="text-align:right;margin:48px 0 0 0;";u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
 u.className="geBtn";a.editor.cancelFirst&&n.appendChild(u);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){c.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),x.className="geBtn",n.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();g(!1)}),x.className="geBtn",n.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();g(!0)});x.className=
 "geBtn gePrimaryBtn";n.appendChild(x);a.editor.cancelFirst||n.appendChild(u);l.appendChild(n);this.container=l};var x=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)):(x.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))}})();
-var ErrorDialog=function(a,c,b,f,h,k,m,t,p,d,g){p=null!=p?p:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,c);n.appendChild(q)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");
-b.style.marginTop="16px";b.style.textAlign="center";null!=k&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=g&&g()}),d.className="geBtn",b.appendChild(d));var u=mxUtils.button(f,function(){p&&a.hideDialog();null!=h&&h()});u.className="geBtn";b.appendChild(u);null!=m&&(f=mxUtils.button(m,function(){p&&a.hideDialog();null!=t&&t()}),f.className="geBtn gePrimaryBtn",
+var ErrorDialog=function(a,c,b,f,h,k,m,p,t,d,g){t=null!=t?t:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,c);n.appendChild(q)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");
+b.style.marginTop="16px";b.style.textAlign="center";null!=k&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=g&&g()}),d.className="geBtn",b.appendChild(d));var u=mxUtils.button(f,function(){t&&a.hideDialog();null!=h&&h()});u.className="geBtn";b.appendChild(u);null!=m&&(f=mxUtils.button(m,function(){t&&a.hideDialog();null!=p&&p()}),f.className="geBtn gePrimaryBtn",
 b.appendChild(f));this.init=function(){u.focus()};n.appendChild(b);this.container=n};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,f){f.ui=a.ui;return b};a.afterDecode=function(a,b,f){f.previousColor=f.color;f.previousImage=f.image;f.previousFormat=f.format;null!=f.foldingEnabled&&(f.foldingEnabled=!f.foldingEnabled);null!=f.mathEnabled&&(f.mathEnabled=!f.mathEnabled);null!=f.shadowVisible&&(f.shadowVisible=!f.shadowVisible);return f};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.0.38";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,f,u){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,f,u);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,f){f.ui=a.ui;return b};a.afterDecode=function(a,b,f){f.previousColor=f.color;f.previousImage=f.image;f.previousFormat=f.format;null!=f.foldingEnabled&&(f.foldingEnabled=!f.foldingEnabled);null!=f.mathEnabled&&(f.mathEnabled=!f.mathEnabled);null!=f.shadowVisible&&(f.shadowVisible=!f.shadowVisible);return f};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.0.39";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,f,u){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,f,u);else if(EditorUi.enableLogging)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=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/log?severity="+d+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
 ":lnum:"+encodeURIComponent(c)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};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(n){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
@@ -7927,16 +7927,16 @@ Error(a);b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(nu
 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)};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),
 b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,b,c,f,u,h,k){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var d=
 this.getBaseFilename(!u),g=d+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(f)):this.getFileData(!0,null,null,null,f,u));this.saveData(g,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(g,a,n,"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(b,d){try{var c=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var g=this.createDownloadRequest(b,a,f,d,k,u);this.editor.graph.pageVisible=c;return g}catch(C){this.handleError(C)}}));else{var q=null,w=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(q)}))});if("svg"==a){var v=this.editor.graph.background;
-if(k||v==mxConstants.NONE)v=null;var m=this.editor.graph.getSvg(v,null,null,null,null,f);c&&this.editor.graph.addSvgShadow(m);this.convertImages(m,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();w('<?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",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();w(a)}),f)}}catch(G){this.handleError(G)}};
+function(b,d){try{var c=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var g=this.createDownloadRequest(b,a,f,d,k,u);this.editor.graph.pageVisible=c;return g}catch(B){this.handleError(B)}}));else{var q=null,w=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(q)}))});if("svg"==a){var v=this.editor.graph.background;
+if(k||v==mxConstants.NONE)v=null;var m=this.editor.graph.getSvg(v,null,null,null,null,f);c&&this.editor.graph.addSvgShadow(m);this.convertImages(m,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();w('<?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",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();w(a)}),f)}}catch(H){this.handleError(H)}};
 EditorUi.prototype.createDownloadRequest=function(a,b,c,f,u,h){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==h?!1:"xmlpng"!=b);var g="",l="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";"pdf"==b&&0==h&&(l="&allPages=1");if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(h=0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){g="&from="+h;break}h=this.editor.graph.background;
 "png"==b&&u&&(h=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+g+l+"&bg="+(null!=h?h:mxConstants.NONE)+"&base64="+f+"&embedXml="+d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,g=mxUtils.bind(this,function(c){var g=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<g.length&&(g+="\n"),g+=c);c=new LocalFile(this,"csv"!=a.format&&
 0<g.length?g:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(g,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var l=null!=a.interval?parseInt(a.interval):6E4,f=null,n=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
 mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),q()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),q=mxUtils.bind(this,function(){window.clearTimeout(f);f=window.setTimeout(n,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){q();n()}));q();n()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&
 !this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.loadUrl(f,mxUtils.bind(this,function(a){g(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else g("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,d){c.alert(a.tooltip)});return b}var d=null,c=this;if(null!=a&&0<a.length&&(d=mxUtils.parseXml(a),a=null!=d?d.documentElement:null,null!=
-a&&"updates"==a.nodeName)){var f=this.editor.graph,h=f.getModel();h.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=h.getCell(a.getAttribute("id"));if(null!=m){try{var l=a.getAttribute("value");if(null!=l){var x=mxUtils.parseXml(l).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))h.setValue(m,x);else for(var t=x.attributes,p=0;p<t.length;p++)f.setAttributeForCell(m,t[p].nodeName,0<t[p].nodeValue.length?t[p].nodeValue:null)}}catch(F){null!=
-window.console&&console.log("Error in value for "+m.id+": "+F)}try{var B=a.getAttribute("style");null!=B&&f.model.setStyle(m,B)}catch(F){null!=window.console&&console.log("Error in style for "+m.id+": "+F)}try{var z=a.getAttribute("icon");if(null!=z){var G=0<z.length?JSON.parse(z):null;null!=G&&G.append||f.removeCellOverlays(m);null!=G&&f.addCellOverlay(m,b(G))}}catch(F){null!=window.console&&console.log("Error in icon for "+m.id+": "+F)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),
-H=f.getCellGeometry(m);if(null!=H){H=H.clone();for(key in D){var I=parseFloat(D[key]);"dx"==key?H.x+=I:"dy"==key?H.y+=I:"dw"==key?H.width+=I:"dh"==key?H.height+=I:H[key]=parseFloat(D[key])}f.model.setGeometry(m,H)}}}catch(F){null!=window.console&&console.log("Error in icon for "+m.id+": "+F)}}}else if("model"==a.nodeName){for(var C=a.firstChild;null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=C.nextSibling;null!=C&&(new mxCodec(a.firstChild)).decode(C,h)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
+a&&"updates"==a.nodeName)){var f=this.editor.graph,h=f.getModel();h.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=h.getCell(a.getAttribute("id"));if(null!=m){try{var l=a.getAttribute("value");if(null!=l){var x=mxUtils.parseXml(l).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))h.setValue(m,x);else for(var t=x.attributes,p=0;p<t.length;p++)f.setAttributeForCell(m,t[p].nodeName,0<t[p].nodeValue.length?t[p].nodeValue:null)}}catch(G){null!=
+window.console&&console.log("Error in value for "+m.id+": "+G)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(m,C)}catch(G){null!=window.console&&console.log("Error in style for "+m.id+": "+G)}try{var A=a.getAttribute("icon");if(null!=A){var H=0<A.length?JSON.parse(A):null;null!=H&&H.append||f.removeCellOverlays(m);null!=H&&f.addCellOverlay(m,b(H))}}catch(G){null!=window.console&&console.log("Error in icon for "+m.id+": "+G)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),
+F=f.getCellGeometry(m);if(null!=F){F=F.clone();for(key in D){var I=parseFloat(D[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(D[key])}f.model.setGeometry(m,F)}}}catch(G){null!=window.console&&console.log("Error in icon for "+m.id+": "+G)}}}else if("model"==a.nodeName){for(var B=a.firstChild;null!=B&&B.nodeType!=mxConstants.NODETYPE_ELEMENT;)B=B.nextSibling;null!=B&&(new mxCodec(a.firstChild)).decode(B,h)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&
 (f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{h.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return d};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,
 c="",g=d.lastIndexOf(".");0<=g&&(c=d.substring(g),d=d.substring(0,g));if(b)var f=new Date,g=f.getFullYear(),h=f.getMonth()+1,k=f.getDate(),l=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),d=d+(" "+(g+"-"+h+"-"+k+"-"+l+"-"+x+"-"+f));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
 this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);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("");
@@ -7957,19 +7957,19 @@ function(b,d){0==b.length&&a.isEditable()?(null==g&&(g=document.createElement("d
 mxUtils.bind(this,function(){b=this.convertDataUri(b);var d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(d+="aspect=fixed;");return this.sidebar.createVertexTemplate(d+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[n]);
 c=null!=c&&0<c.length?c:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var l=h.parentNode.previousSibling;c=l.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor=
 "inherit");l.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin="0 3px";var t=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var d=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=t?this.confirm(mxResources.get("allChangesLost"),
-null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var p=this.editor.graph,z=null,G=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=m.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",
-z.style.marginRight="2px",z.style.marginTop="-2px",k.insertBefore(z,k.firstChild),l.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),l.style.paddingRight=18*k.childNodes.length+"px")})):null==t&&(t=m.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),k.insertBefore(t,k.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,
-function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==t||a.isModified()||(l.style.paddingRight=18*k.childNodes.length+"px",t.parentNode.removeChild(t),t=null)});mxEvent.consume(d)})),l.style.paddingRight=18*k.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,d,c,l){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var n=p.getCellGeometry(a[f]);null!=n&&n.translate(-d.x,-d.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,
+null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var p=this.editor.graph,A=null,H=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=m.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",
+A.style.marginRight="2px",A.style.marginTop="-2px",k.insertBefore(A,k.firstChild),l.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),l.style.paddingRight=18*k.childNodes.length+"px")})):null==t&&(t=m.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),k.insertBefore(t,k.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,
+function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==t||a.isModified()||(l.style.paddingRight=18*k.childNodes.length+"px",t.parentNode.removeChild(t),t=null)});mxEvent.consume(d)})),l.style.paddingRight=18*k.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,d,c,l){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var n=p.getCellGeometry(a[f]);null!=n&&n.translate(-d.x,-d.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,
 d.width,d.height,l||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=l&&(a.title=l);b.push(a);D(c);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),I=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),p.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
-p.getSelectionCells(),d=p.view.getBounds(b),c=p.view.scale;d.x/=c;d.y/=c;d.width/=c;d.height/=c;d.x-=p.view.translate.x;d.y-=p.view.translate.y;H(b,d)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",
+p.getSelectionCells(),d=p.view.getBounds(b),c=p.view.scale;d.x/=c;d.y/=c;d.width/=c;d.height/=c;d.x-=p.view.translate.x;d.y-=p.view.translate.y;F(b,d)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",
 h.style.cursor="copy",p.panningManager.stop(),p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(h.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),h.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),
 p.isMouseDown=!1,p.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
 (mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";h.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"drop",mxUtils.bind(this,function(a){h.style.border="3px solid transparent";h.style.cursor="";null!=g&&(g.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,l,n,q,k,u,x,w){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,q,k),d)],d[0].vertex=!0,H(d,new mxRectangle(0,0,q,k),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var m=!1,v=mxUtils.bind(this,function(d,
-c){if(null!=d&&"text/xml"==c){var l=mxUtils.parseXml(d);if("mxlibrary"==l.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(l.documentElement));f(n,h);b=b.concat(n);D(a);this.spinner.stop();m=!0}catch(K){}else if("mxfile"==l.documentElement.nodeName)try{for(var q=l.documentElement.getElementsByTagName("diagram"),l=0;l<q.length;l++){var n=mxUtils.getTextContent(q[l]),u=this.stringToCells(this.editor.graph.decompress(n)),k=this.editor.graph.getBoundingBoxFromGeometry(u);H(u,new mxRectangle(0,
+0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,l,n,q,k,u,x,w){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,q,k),d)],d[0].vertex=!0,F(d,new mxRectangle(0,0,q,k),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var m=!1,v=mxUtils.bind(this,function(d,
+c){if(null!=d&&"text/xml"==c){var l=mxUtils.parseXml(d);if("mxlibrary"==l.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(l.documentElement));f(n,h);b=b.concat(n);D(a);this.spinner.stop();m=!0}catch(K){}else if("mxfile"==l.documentElement.nodeName)try{for(var q=l.documentElement.getElementsByTagName("diagram"),l=0;l<q.length;l++){var n=mxUtils.getTextContent(q[l]),u=this.stringToCells(this.editor.graph.decompress(n)),k=this.editor.graph.getBoundingBoxFromGeometry(u);F(u,new mxRectangle(0,
 0,k.width,k.height),a)}m=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=w&&null!=u&&(/(\.v(dx|sdx?))($|\?)/i.test(u)||/(\.vs(x|sx?))($|\?)/i.test(u))?this.importVisio(w,function(a){v(a,"text/xml")},null,u):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,u)&&null!=w?this.parseFile(w,
 mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?v(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",h.style.cursor="");a.stopPropagation();a.preventDefault()}));
-m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",G);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&G(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),
+m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",H);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&H(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),
 c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}l.appendChild(k);l.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],g=c.data;if(null!=g){var g=this.convertDataUri(g),
 f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+g,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(g=this.stringToCells(this.editor.graph.decompress(c.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,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.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});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=
@@ -7982,28 +7982,28 @@ this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};Edit
 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,f){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=g||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok"),
 q=null;b=null!=b?b:mxResources.get("error");if(null!=g)if(null!=g.retry&&(n=mxResources.get("cancel"),q=function(){d();g.retry()}),404==g.code||404==g.status||403==g.code){a=403==g.code?null!=g.message?mxUtils.htmlEntities(g.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var l=window.location.hash;null!=l&&"#G"==l.substring(0,2)&&(l=l.substring(2),a+='<br><a href="https://drive.google.com/open?id='+l+'" target="_blank">'+
 mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=g.message?a=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?a=mxUtils.htmlEntities(g.response.error):"undefined"!==window.App&&(g.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,n,c,q,null,null,null,null,null,null,null,f?c:null)}else null!=c&&c()};EditorUi.prototype.showError=
-function(a,b,c,f,h,k,w,m,l,x,p,t,B){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),f,h,k,w,t,m,l);this.showDialog(a.container,x||340,p||(null!=b&&120<b.length?180:150),!0,!1,B);a.init()};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,f,h,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,
+function(a,b,c,f,h,k,w,m,l,x,p,t,C){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),f,h,k,w,t,m,l);this.showDialog(a.container,x||340,p||(null!=b&&120<b.length?180:150),!0,!1,C);a.init()};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,f,h,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,
 a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},f,h);this.showDialog(a.container,340,90,!0,k);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};
 EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,g=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(g,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);d.init();document.execCommand("selectall",
 !1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,f,h){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?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{var d=document.createElement("a"),g=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof d.download;
 if(mxClient.IS_GC)var n=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),g=65==(n?parseInt(n[2],10):!1)?!1:g;if(g||this.isOffline()){d.href=URL.createObjectURL(f?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(l){}}else this.createEchoRequest(a,b,c,f,h).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=
 function(a,b,c,f,h,k){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=h?"&format="+h:"")+(null!=k?"&base64="+k:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,g=Math.ceil(c/1024),f=Array(g),h=0;h<g;++h){for(var k=1024*h,l=Math.min(k+1024,c),x=Array(l-k),m=0;k<l;++m,++k)x[m]=d[k].charCodeAt(0);f[h]=new Uint8Array(x)}return new Blob(f,{type:b})};
-EditorUi.prototype.saveLocalFile=function(a,b,c,f,h,k,w){k=null!=k?k:!1;w=null!=w?w:"vsdx"!=h&&(!mxClient.IS_IOS||!navigator.standalone);h=this.getServiceCount(k);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){try{if("_blank"==d)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,c,f);else d==App.MODE_DEVICE||
-"download"==d?this.doSaveLocalFile(a,b,c,f):null!=b&&0<b.length&&this.pickFolder(d,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,f,d,g)}catch(E){this.handleError(E)}}))}catch(A){this.handleError(A)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,w,null,1<h,4<h&&(!k||6>h)?3:4,a,c,f);this.showDialog(b.container,420,1==h?160:4<h?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||
+EditorUi.prototype.saveLocalFile=function(a,b,c,f,h,k,m){k=null!=k?k:!1;m=null!=m?m:"vsdx"!=h&&(!mxClient.IS_IOS||!navigator.standalone);h=this.getServiceCount(k);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){try{if("_blank"==d)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,c,f);else d==App.MODE_DEVICE||
+"download"==d?this.doSaveLocalFile(a,b,c,f):null!=b&&0<b.length&&this.pickFolder(d,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,f,d,g)}catch(E){this.handleError(E)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,m,null,1<h,4<h&&(!k||6>h)?3:4,a,c,f);this.showDialog(b.container,420,1==h?160:4<h?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||
 11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};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 g=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});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){g.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,f,h){this.isLocalFileSave()?this.saveLocalFile(c,a,f,h,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,f,h,b,d)}),c,h,f)};EditorUi.prototype.saveRequest=function(a,
-b,c,f,h,k,w){w=null!=w?w:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);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!=f)try{this.exportFile(f,
-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,w,null,1<d,4<d?3:4,f,k,h);this.showDialog(a.container,380,1==d?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,f,h,k){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,f,h,k,w,m,l,x){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;
-d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var g=this.editor.graph.getSvg(d,a,w,m,null,c,null,null,"blank"==x?"_blank":"self"==x?"_top":null);f&&this.editor.graph.addSvgShadow(g,g);var n=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();h&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,l));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");
+b,c,f,h,k,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);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!=f)try{this.exportFile(f,
+a,k,!0,d,c)}catch(C){this.handleError(C)}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(C){this.handleError(C)}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,m,null,1<d,4<d?3:4,f,k,h);this.showDialog(a.container,380,1==d?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,f,h,k){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,f,h,k,m,p,l,x){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;
+d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var g=this.editor.graph.getSvg(d,a,m,p,null,c,null,null,"blank"==x?"_blank":"self"==x?"_top":null);f&&this.editor.graph.addSvgShadow(g,g);var n=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();h&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,l));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");
 b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!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()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,
-g,!1,mxUtils.bind(this,function(){k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,q,this.thumbImageCache)):q(g)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,f,h,k,w){return this.addCheckbox(a,c,f,h,k,w,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,f,h,k,w,m){k=null!=k?k:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",w?"radio":"checkbox");w="geCheckbox-"+Editor.guid();d.id=w;null!=m&&d.setAttribute("name",
-m);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);f&&d.setAttribute("disabled","disabled");k&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",w),a.appendChild(c),h||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(),g="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(g=window.location.href);
+g,!1,mxUtils.bind(this,function(){k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,q,this.thumbImageCache)):q(g)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,f,h,k,m){return this.addCheckbox(a,c,f,h,k,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,f,h,k,m,p){k=null!=k?k:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();d.id=m;null!=p&&d.setAttribute("name",
+p);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);f&&d.setAttribute("disabled","disabled");k&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",m),a.appendChild(c),h||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(),g="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(g=window.location.href);
 var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));f.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");f.appendChild(c);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=
 new FilenameDialog(this,g,mxResources.get("ok"),function(a){null!=a?g=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.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)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===f.value?"_blank":g:null},getEditInput:function(){return d},
 getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"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=
@@ -8017,25 +8017,25 @@ a=null!=a?"&fetch="+encodeURIComponent(a):"";t(b,'<script type="text/javascript"
 g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","type-embedhtmldialog");g=h.cloneNode(!0);g.setAttribute("value","copy");n.appendChild(g);
 var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));n.appendChild(l);mxUtils.br(n);n.appendChild(h);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));n.appendChild(l);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),n.appendChild(l),
 mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));g.setAttribute("checked","checked");null==c&&h.setAttribute("disabled","disabled");d.appendChild(n);var q=this.addLinkSection(d),m=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=
-"100%";d.appendChild(p);var t=this.addCheckbox(d,mxResources.get("fit"),!0),n=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(d,mxResources.get("allPages"),n,!n),D=this.addCheckbox(d,mxResources.get("layers"),!0),H=this.addCheckbox(d,mxResources.get("lightbox"),!0),I=this.addEditButton(d,H),C=I.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&H.checked?I.getEditSelect().removeAttribute("disabled"):
-I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){f(h.checked?c:null,m.checked,p.value,q.getTarget(),q.getColor(),t.checked,G.checked,D.checked,H.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,f,h,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=
+"100%";d.appendChild(p);var t=this.addCheckbox(d,mxResources.get("fit"),!0),n=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(d,mxResources.get("allPages"),n,!n),D=this.addCheckbox(d,mxResources.get("layers"),!0),F=this.addCheckbox(d,mxResources.get("lightbox"),!0),I=this.addEditButton(d,F),B=I.getEditInput();B.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):
+I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){f(h.checked?c:null,m.checked,p.value,q.getTarget(),q.getColor(),t.checked,H.checked,D.checked,F.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,f,h,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 l=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace=
 "normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));n.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));q.style.marginTop="12px";q.className="geBtn";n.appendChild(q);d.appendChild(n);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));n.appendChild(q);mxEvent.addListener(q,
-"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 u=null,m=null;if(null!=c||null!=f)a+=30,mxUtils.write(d,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type",
-"text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",u.value="100%",d.appendChild(u),mxUtils.write(d,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=f+"px",d.appendChild(m),mxUtils.br(d);var v=this.addLinkSection(d,k);c=null!=this.pages&&1<this.pages.length;var p=null;if(null==l||l.constructor!=
-window.DriveFile||b)p=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(d,mxResources.get("lightbox"),!0),H=this.addEditButton(d,t),I=H.getEditInput(),C=this.addCheckbox(d,mxResources.get("layers"),!0);C.style.marginLeft=I.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(C.removeAttribute("disabled"),I.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));
-I.checked&&t.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){h(v.getTarget(),v.getColor(),null==p?!0:p.checked,t.checked,H.getLink(),C.checked,null!=u?u.value:null,null!=m?m.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",
-!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,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:4px";d.appendChild(g);var n=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),h=f?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,
+"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,u=null;if(null!=c||null!=f)a+=30,mxUtils.write(d,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type",
+"text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",d.appendChild(m),mxUtils.write(d,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=f+"px",d.appendChild(u),mxUtils.br(d);var p=this.addLinkSection(d,k);c=null!=this.pages&&1<this.pages.length;var v=null;if(null==l||l.constructor!=
+window.DriveFile||b)v=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,t),I=F.getEditInput(),B=this.addCheckbox(d,mxResources.get("layers"),!0);B.style.marginLeft=I.style.marginLeft;B.style.marginBottom="16px";B.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(B.removeAttribute("disabled"),I.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));
+I.checked&&t.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){h(p.getTarget(),p.getColor(),null==v?!0:v.checked,t.checked,F.getLink(),B.checked,null!=m?m.value:null,null!=u?u.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",
+!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,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:4px";d.appendChild(g);var n=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),h=f?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,
 l=f?null:this.addCheckbox(d,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=l&&(l.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!n.checked,null!=h?h.checked:!1,null!=l?l.checked:!1)}),null,a,b);this.showDialog(a.container,300,f?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,f,h,k,m,p){m=null!=m?m:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph,n="jpeg"==
 p?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(q);mxUtils.write(d,mxResources.get("zoom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";d.appendChild(u);mxUtils.write(d,mxResources.get("borderWidth")+":");var w=document.createElement("input");
 w.setAttribute("type","text");w.style.marginRight="16px";w.style.width="60px";w.style.marginLeft="4px";w.value=this.lastExportBorder||"0";d.appendChild(w);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=p),t=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type",
-"checkbox");k&&(d.appendChild(y),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),n+=26,mxEvent.addListener(t,"change",function(){t.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&
-this.canvasSupported||C.setAttribute("disabled","disabled");b&&(d.appendChild(C),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),n+=26);var F=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=p),J=null!=this.pages&&1<this.pages.length,N=this.addCheckbox(d,J?mxResources.get("allPages"):"",J,!J,null,"jpeg"!=p);N.style.marginLeft="24px";N.style.marginBottom="16px";J||(N.style.display="none");mxEvent.addListener(F,"change",function(){F.checked&&J?N.removeAttribute("disabled"):
+"checkbox");k&&(d.appendChild(y),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),n+=26,mxEvent.addListener(t,"change",function(){t.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&
+this.canvasSupported||B.setAttribute("disabled","disabled");b&&(d.appendChild(B),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),n+=26);var G=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=p),J=null!=this.pages&&1<this.pages.length,N=this.addCheckbox(d,J?mxResources.get("allPages"):"",J,!J,null,"jpeg"!=p);N.style.marginLeft="24px";N.style.marginBottom="16px";J||(N.style.display="none");mxEvent.addListener(G,"change",function(){G.checked&&J?N.removeAttribute("disabled"):
 N.setAttribute("disabled","disabled")});m&&J||N.setAttribute("disabled","disabled");var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));L.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));L.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));L.appendChild(a);"svg"==p&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(L),mxUtils.br(d),mxUtils.br(d),n+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=w.value;this.lastExportZoom=u.value;h(u.value,v.checked,!t.checked,I.checked,F.checked,C.checked,w.value,y.checked,!N.checked,L.value)}),null,c,f);this.showDialog(c.container,340,n,!0,!0);u.focus();mxClient.IS_GC||
+a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));L.appendChild(a);"svg"==p&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(L),mxUtils.br(d),mxUtils.br(d),n+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=w.value;this.lastExportZoom=u.value;h(u.value,v.checked,!t.checked,I.checked,G.checked,B.checked,w.value,y.checked,!N.checked,L.value)}),null,c,f);this.showDialog(c.container,340,n,!0,!0);u.focus();mxClient.IS_GC||
 mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,f,h){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var n=document.createElement("h3");mxUtils.write(n,b);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(n)}var l=this.addCheckbox(d,mxResources.get("fit"),!0),k=this.addCheckbox(d,mxResources.get("shadow"),
-g.shadowVisible&&f,!f),q=this.addCheckbox(d,c),u=this.addCheckbox(d,mxResources.get("lightbox"),!0),m=this.addEditButton(d,u),p=m.getEditInput(),t=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(d,mxResources.get("layers"),t,!t);D.style.marginLeft=p.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(t&&D.removeAttribute("disabled"),p.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),p.setAttribute("disabled",
-"disabled"));p.checked&&u.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(l.checked,k.checked,q.checked,u.checked,m.getLink(),D.checked)}),null,mxResources.get("embed"),h);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,f,h,k,m,p){function d(b){var d=" ",l="";f&&(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('https://www.draw.io/?client=1&lightbox=1"+
+g.shadowVisible&&f,!f),q=this.addCheckbox(d,c),m=this.addCheckbox(d,mxResources.get("lightbox"),!0),u=this.addEditButton(d,m),p=u.getEditInput(),t=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(d,mxResources.get("layers"),t,!t);D.style.marginLeft=p.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(t&&D.removeAttribute("disabled"),p.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),p.setAttribute("disabled",
+"disabled"));p.checked&&m.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(l.checked,k.checked,q.checked,m.checked,u.getLink(),D.checked)}),null,mxResources.get("embed"),h);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,f,h,k,m,p){function d(b){var d=" ",l="";f&&(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('https://www.draw.io/?client=1&lightbox=1"+
 (h?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');m('<img src="'+b+'"'+n+(""!=l?' style="'+l+'"':"")+d+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){p({message:mxResources.get("unknownError")})}),
 null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),g.width*g.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+n+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):p({message:mxResources.get("unknownError")})}))}else p({message:mxResources.get("drawingTooLarge")})};
 EditorUi.prototype.createEmbedSvg=function(a,b,c,f,h,k,m){var d=this.editor.graph.getSvg(),g=d.getElementsByTagName("a");if(null!=g)for(var n=0;n<g.length;n++){var q=g[n].getAttribute("href");null!=q&&"#"==q.charAt(0)&&"_blank"==g[n].getAttribute("target")&&g[n].removeAttribute("target")}f&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var u=" ",w="";f&&(u="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('https://www.draw.io/?client=1&lightbox=1"+
@@ -8047,27 +8047,27 @@ this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(v){}f
 f=d.getGlobalVariable,n=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(n.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==g&&(g=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(g)));a(f.substring(f.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,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,f,h,k,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,k);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=h)this.convertImages(b,mxUtils.bind(this,function(a){h((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
 mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,f,h,k,m,p,l){l=null!=l?l:"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.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,h?this.getFileData(!0,null,null,null,c,p):null,l)}catch(E){"Invalid image"==E.message?this.downloadFile(l):this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,f,null,null,k,m)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
+try{this.saveCanvas(a,h?this.getFileData(!0,null,null,null,c,p):null,l)}catch(E){"Invalid image"==E.message?this.downloadFile(l):this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,f,null,null,k,m)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
 "").replace(RegExp("[\\s\"']+$","g"),"")},d=this.editor.fontCss.split("url("),c=0,f={},h=mxUtils.bind(this,function(){if(0==c){for(var g=[d[0]],l=1;l<d.length;l++){var h=d[l].indexOf(")");g.push('url("');g.push(f[b(d[l].substring(0,h))]);g.push('"'+d[l].substring(h))}this.editor.resolvedFontCss=g.join("");a()}});if(0<d.length)for(var k=1;k<d.length;k++){var m=d[k].indexOf(")"),l=null,x=d[k].indexOf("format(",m);0<x&&(l=b(d[k].substring(x+7,d[k].indexOf(")",x))));mxUtils.bind(this,function(a){if(null==
 f[a]){f[a]=a;c++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var d=
-a;/^https?:\/\//.test(d)&&!this.isCorsEnabledForUrl(d)&&(d=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(d,mxUtils.bind(this,function(b){f[a]=b;c--;h()}),mxUtils.bind(this,function(a){c--;h()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(d[k].substring(0,m)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,f,h,k,m,p,l,x,t,E,B,z){k=null!=k?k:!0;E=null!=E?E:this.editor.graph;B=null!=B?B:0;var d=l?null:E.background;d==mxConstants.NONE&&(d=null);null==d&&(d=f);null==d&&0==l&&
-(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(E.getSvg(d,null,null,z,null,null!=m?m:!0,null,null,null,x),mxUtils.bind(this,function(c){var g=new Image;g.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),l=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=k?Math.min(1,Math.min(3*b/(4*n),b/l)):b/l);l=Math.ceil(p*l)+2*B;n=Math.ceil(p*n)+2*B;f.setAttribute("width",l);f.setAttribute("height",n);var q=f.getContext("2d");
-null!=d&&(q.beginPath(),q.rect(0,0,l,n),q.fillStyle=d,q.fill());q.scale(p,p);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(g,B/p,B/p);a(f)},0):(q.drawImage(g,B/p,B/p),a(f))}catch(L){null!=h&&h(L)}});g.onerror=function(a){null!=h&&h(a)};try{x&&this.editor.graph.addSvgShadow(c,c);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(E,
-c,!0,mxUtils.bind(this,function(){g.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(C){null!=h&&h(C)}}),c,t)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var g="http://"==d.substring(0,7)||"https://"==d.substring(0,8);g&&!navigator.onLine?d=c.svgBrokenImage.src:!g||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=
+a;/^https?:\/\//.test(d)&&!this.isCorsEnabledForUrl(d)&&(d=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(d,mxUtils.bind(this,function(b){f[a]=b;c--;h()}),mxUtils.bind(this,function(a){c--;h()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(d[k].substring(0,m)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,f,h,k,m,p,l,x,t,E,C,A){k=null!=k?k:!0;E=null!=E?E:this.editor.graph;C=null!=C?C:0;var d=l?null:E.background;d==mxConstants.NONE&&(d=null);null==d&&(d=f);null==d&&0==l&&
+(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(E.getSvg(d,null,null,A,null,null!=m?m:!0,null,null,null,x),mxUtils.bind(this,function(c){var g=new Image;g.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),l=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=k?Math.min(1,Math.min(3*b/(4*n),b/l)):b/l);l=Math.ceil(p*l)+2*C;n=Math.ceil(p*n)+2*C;f.setAttribute("width",l);f.setAttribute("height",n);var q=f.getContext("2d");
+null!=d&&(q.beginPath(),q.rect(0,0,l,n),q.fillStyle=d,q.fill());q.scale(p,p);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(g,C/p,C/p);a(f)},0):(q.drawImage(g,C/p,C/p),a(f))}catch(L){null!=h&&h(L)}});g.onerror=function(a){null!=h&&h(a)};try{x&&this.editor.graph.addSvgShadow(c,c);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(E,
+c,!0,mxUtils.bind(this,function(){g.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(B){null!=h&&h(B)}}),c,t)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var g="http://"==d.substring(0,7)||"https://"==d.substring(0,8);g&&!navigator.onLine?d=c.svgBrokenImage.src:!g||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=
 d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,f){null==f&&(f=this.createImageUrlConverter());var d=0,g=c||{};c=mxUtils.bind(this,function(c,h){for(var l=a.getElementsByTagName(c),n=0;n<l.length;n++)mxUtils.bind(this,function(c){var l=f.convert(c.getAttribute(h));if(null!=l&&"data:"!=l.substring(0,5)){var n=g[l];null==n?(d++,this.convertImageToDataUri(l,function(f){null!=f&&(g[l]=f,c.setAttribute(h,
 f));d--;0==d&&b(a)})):c.setAttribute(h,n)}else null!=l&&c.setAttribute(h,l)})(l[n])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,f,h,k){try{var d=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);h=null!=h?h:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var g=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
 "undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var g=Array(a.length),f=0;f<a.length;f++)g[f]=String.fromCharCode(a[f]);g=g.join("")}k=null!=k?k:"data:image/png;base64,";g=k+this.base64Encode(g)}b(g)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){h&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(l){null!=c&&c(l)}};EditorUi.prototype.isCorsEnabledForUrl=
 function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
 function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),g=a.getContext("2d");a.height=d.height;a.width=d.width;g.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=
-function(a,b,c,f,h){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var n=mxUtils.parseXml(a),l=this.editor.extractGraphModel(n.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var k=l.getElementsByTagName("diagram");if(1==k.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){g.model.beginUpdate();try{for(a=0;a<k.length;a++){k[a].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(k[a])),
-m=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[m+1]));g.model.execute(new ChangePage(this,q,q,m))}}finally{g.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(d=g.importGraphModel(l,b,c,f))}}catch(B){throw h||this.handleError(B,mxResources.get("invalidOrMissingFile")),B;}return d};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,f){f=null!=
+function(a,b,c,f,h){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var n=mxUtils.parseXml(a),l=this.editor.extractGraphModel(n.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var k=l.getElementsByTagName("diagram");if(1==k.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){g.model.beginUpdate();try{for(a=0;a<k.length;a++){k[a].removeAttribute("id");var m=this.updatePageRoot(new DiagramPage(k[a])),
+q=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,m,m,q))}}finally{g.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(d=g.importGraphModel(l,b,c,f))}}catch(C){throw h||this.handleError(C,mxResources.get("invalidOrMissingFile")),C;}return d};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,f){f=null!=
 f?f: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)if(this.isRemoteVisioFormat(f)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a,f);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{g.response.name=f,this.doImportVisio(g.response,b,c)}catch(y){c(y)}else c({})});
 g.send(d)}else try{this.doImportVisio(a,b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?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(u){c(u)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
 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()}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?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{b(LucidImporter.importState(JSON.parse(a)))}catch(u){c(u)}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,
 g=null;d.getModel().beginUpdate();try{g=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),d.updateCellSize(g,!0)}finally{d.getModel().endUpdate()}return g};EditorUi.prototype.insertTextAt=function(a,b,c,f,h,k,m){k=null!=k?k:!0;m=null!=m?m:!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()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var g=this.extractGraphModelFromPng(a),n=this.importXml(g,b,c,k,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(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)),n=this.importXml(g,b,c,k,!0),0<n.length)return n}catch(A){}this.loadImage(a,mxUtils.bind(this,function(g){if("data:"==a.substring(0,5))this.resizeImage(g,a,mxUtils.bind(this,function(a,g,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+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)),n=this.importXml(g,b,c,k,!0),0<n.length)return n}catch(z){}this.loadImage(a,mxUtils.bind(this,function(g){if("data:"==a.substring(0,5))this.resizeImage(g,a,mxUtils.bind(this,function(a,g,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
 this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/g.width,this.maxImageSize/g.height)),l=Math.round(g.width*f);g=Math.round(g.height*f);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),l,g,"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;"+(f?"html=1;":"")),d.updateCellSize(g),d.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{d.getModel().endUpdate()}d.setSelectionCell(g)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,c,k))}),mxUtils.bind(this,function(a){this.handleError(a)}));
 else{d=this.editor.graph;h=null;d.getModel().beginUpdate();try{h=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(f?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[h])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),h.value=a,d.updateCellSize(h),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(h.value)&&
@@ -8081,13 +8081,13 @@ a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,n)):null!=l&&null!
 b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}k=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);b+=
 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,f,h,k,m,p,l,x,t,E){b=null!=b?b:0;c=null!=c?c:0;f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=b&&null!=c,g=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=t||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>q){n=!0;break}var w=mxUtils.bind(this,function(){var l=this.editor.graph,n=l.gridSize;
 h=null!=h?h:mxUtils.bind(this,function(a,b,c,f,g,l,h,k,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,f,g,l,h,k,n,d,E)});k=null!=k?k:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,u=q,w=[],v=mxUtils.bind(this,function(a,b){w[a]=b;if(0==--u){this.spinner.stop();if(null!=p)p(w);else{var c=[];l.getModel().beginUpdate();
-try{for(var d=0;d<w.length;d++){var f=w[d]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}k(c)}}),A=0;A<q;A++)mxUtils.bind(this,function(d){var k=a[d],q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,u=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(u+1)))),w=mxUtils.parseXml(p),p=w.getElementsByTagName("svg");if(0<p.length){var p=p[0],A=E?null:p.getAttribute("content");
-null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null==A||"<mxfile "!==A.substring(0,8)&&"<mxGraphModel "!==A.substring(0,14)?v(d,mxUtils.bind(this,function(){try{if(q.substring(0,u+1),null!=w){var a=w.getElementsByTagName("svg");if(0<a.length){var g=a[0],m=parseFloat(g.getAttribute("width")),x=parseFloat(g.getAttribute("height")),p=g.getAttribute("viewBox");if(null==p||0==p.length)g.setAttribute("viewBox",
-"0 0 "+m+" "+x);else if(isNaN(m)||isNaN(x)){var t=p.split(" ");3<t.length&&(m=parseFloat(t[2]),x=parseFloat(t[3]))}q=this.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(f/Math.max(1,m)),f/Math.max(1,x)),A=h(q,k.type,b+d*n,c+d*n,Math.max(1,Math.round(m*v)),Math.max(1,Math.round(x*v)),k.name);if(isNaN(m)||isNaN(x)){var E=new Image;E.onload=mxUtils.bind(this,function(){m=Math.max(1,E.width);x=Math.max(1,E.height);A[0].geometry.width=m;A[0].geometry.height=x;g.setAttribute("viewBox","0 0 "+
-m+" "+x);q=this.createSvgDataUri(mxUtils.getXml(g));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));l.setCellStyles("image",q,[A[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(g))}return A}}}catch(na){}return null})):v(d,mxUtils.bind(this,function(){return h(A,"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else v(d,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==k.type){var C=E?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var y=
-new Image;y.src=a.target.result;v(d,mxUtils.bind(this,function(){return h(C,"text/xml",b+d*n,c+d*n,y.width,y.height,k.name)}));p=!0}}p||(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(l){this.resizeImage(l,a.target.result,
-mxUtils.bind(this,function(l,q,m){v(d,mxUtils.bind(this,function(){if(null!=l&&l.length<x){var u=g&&this.isResampleImage(a.target.result,t)?Math.min(1,Math.min(f/q,f/m)):1;return h(l,k.type,b+d*n,c+d*n,Math.round(q*u),Math.round(m*u),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,f,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else h(a.target.result,k.type,b+d*n,c+d*n,240,160,k.name,function(a){v(d,
-function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?h(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){v(d,function(){return a})},k):"image"==k.type.substring(0,5)?q.readAsDataURL(k):q.readAsText(k)})(A)});n?this.confirmImageResize(function(a){g=a;w()},l):w()};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?
+try{for(var d=0;d<w.length;d++){var f=w[d]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}k(c)}}),z=0;z<q;z++)mxUtils.bind(this,function(d){var k=a[d],q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,u=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(u+1)))),w=mxUtils.parseXml(p),p=w.getElementsByTagName("svg");if(0<p.length){var p=p[0],z=E?null:p.getAttribute("content");
+null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?v(d,mxUtils.bind(this,function(){try{if(q.substring(0,u+1),null!=w){var a=w.getElementsByTagName("svg");if(0<a.length){var g=a[0],m=parseFloat(g.getAttribute("width")),x=parseFloat(g.getAttribute("height")),p=g.getAttribute("viewBox");if(null==p||0==p.length)g.setAttribute("viewBox",
+"0 0 "+m+" "+x);else if(isNaN(m)||isNaN(x)){var t=p.split(" ");3<t.length&&(m=parseFloat(t[2]),x=parseFloat(t[3]))}q=this.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(f/Math.max(1,m)),f/Math.max(1,x)),z=h(q,k.type,b+d*n,c+d*n,Math.max(1,Math.round(m*v)),Math.max(1,Math.round(x*v)),k.name);if(isNaN(m)||isNaN(x)){var E=new Image;E.onload=mxUtils.bind(this,function(){m=Math.max(1,E.width);x=Math.max(1,E.height);z[0].geometry.width=m;z[0].geometry.height=x;g.setAttribute("viewBox","0 0 "+
+m+" "+x);q=this.createSvgDataUri(mxUtils.getXml(g));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));l.setCellStyles("image",q,[z[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(g))}return z}}}catch(na){}return null})):v(d,mxUtils.bind(this,function(){return h(z,"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else v(d,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==k.type){var B=E?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var y=
+new Image;y.src=a.target.result;v(d,mxUtils.bind(this,function(){return h(B,"text/xml",b+d*n,c+d*n,y.width,y.height,k.name)}));p=!0}}p||(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(l){this.resizeImage(l,a.target.result,
+mxUtils.bind(this,function(l,m,q){v(d,mxUtils.bind(this,function(){if(null!=l&&l.length<x){var u=g&&this.isResampleImage(a.target.result,t)?Math.min(1,Math.min(f/m,f/q)):1;return h(l,k.type,b+d*n,c+d*n,Math.round(m*u),Math.round(q*u),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,f,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else h(a.target.result,k.type,b+d*n,c+d*n,240,160,k.name,function(a){v(d,
+function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?h(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){v(d,function(){return a})},k):"image"==k.type.substring(0,5)?q.readAsDataURL(k):q.readAsText(k)})(z)});n?this.confirmImageResize(function(a){g=a;w()},l):w()};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,f=function(c,f){if(c||b)mxSettings.setResizeImages(c?f:null),mxSettings.save();d();a(f)};null==c||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,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 f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,f,h,k){h=null!=h?h:this.maxImageSize;var d=Math.max(1,a.width),g=Math.max(1,a.height);
 if(f&&this.isResampleImage(b,k))try{var l=Math.max(d/h,g/h);if(1<l){var n=Math.round(d/l),m=Math.round(g/l),q=document.createElement("canvas");q.width=n;q.height=m;q.getContext("2d").drawImage(a,0,0,n,m);var u=q.toDataURL();if(u.length<b.length){var p=document.createElement("canvas");p.width=n;p.height=m;var t=p.toDataURL();u!==t&&(b=u,d=n,g=m)}}}catch(D){}c(b,d,g)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var f=b,h=0;8>h;h++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[b]=
@@ -8095,25 +8095,25 @@ f;EditorUi.prototype.updateCRC=function(a,b,c,f){for(var d=0;d<f;d++)a=EditorUi.
 16)+(a.charCodeAt(0)<<24)}function k(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 l=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(d(a,4),"IHDR"!=d(a,4))null!=h&&h();else{d(a,17);h=a.substring(0,l);do{var n=g(a);if("IDAT"==d(a,4)){h=a.substring(0,l-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=this.updateCRC(f,
 b,0,4);f=this.updateCRC(f,c,0,c.length);h+=k(c.length)+b+c+k(f^4294967295);h+=a.substring(l-8,a.length);break}h+=a.substring(l-8,l-4+n);d(a,n);d(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),
 "mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(u){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=
-c);d.src=a};var k=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.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(C){a.handleError(C)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,
+c);d.src=a};var k=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.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(B){a.handleError(B)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,
 arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return f.apply(this,arguments)};
 var h=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)};h.call(this,a,c,d)};k.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?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:m.apply(this,arguments)};var p=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))p.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 b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var l=function(){window.setTimeout(function(){x.innerHTML="&nbsp;";
 x.focus();document.execCommand("selectAll",!1,null)},0)};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");mxClient.IS_IE||
 b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var g=c.items;for(index in g){var l=g[index];if("file"===l.kind){if(b.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,g,l){b.insertImage(a,g,l)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var A=!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)||A||(x.style.left=b.container.scrollLeft+10+"px",x.style.top=b.container.scrollTop+10+"px",b.container.appendChild(x),
-A=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",!1,null)},0):(x.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(){!A||224!=c&&17!=c&&91!=c||(A=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),x.parentNode.removeChild(x),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(x,
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var z=!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)||z||(x.style.left=b.container.scrollLeft+10+"px",x.style.top=b.container.scrollTop+10+"px",b.container.appendChild(x),
+z=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",!1,null)},0):(x.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(){!z||224!=c&&17!=c&&91!=c||(z=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),x.parentNode.removeChild(x),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(x,
 "copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(x),l())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(x,!0),l())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var E=this.isSelectionAllowed;this.isSelectionAllowed=
 function(a){return mxEvent.getSource(a)==x?!0:E.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
 mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"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,c,d,f,g,l){b.insertImage(a,g,l)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
 0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var 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));b.insertImage(decodeURIComponent(c),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()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background=
-"whiteSmoke";document.body.appendChild(t);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="220px";z.style.width="30px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);this.vRuler=new mxRuler(this.editor.graph,
-B,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.styledev){t=document.getElementById("geFooter");null!=t&&(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)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
+"whiteSmoke";document.body.appendChild(t);var C=document.createElement("div");C.style.position="absolute";C.style.top="125px";C.style.left="220px";C.style.width="30px";C.style.height="1000px";C.style.background="whiteSmoke";document.body.appendChild(C);var A=document.createElement("div");A.style.position="absolute";A.style.top="95px";A.style.left="220px";A.style.width="30px";A.style.height="30px";A.style.background="whiteSmoke";document.body.appendChild(A);this.vRuler=new mxRuler(this.editor.graph,
+C,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.styledev){t=document.getElementById("geFooter");null!=t&&(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)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:H.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
 D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=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!=D&&(D.parentNode.removeChild(D),D=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,g=c.x/f-d.x,l=c.y/f-d.y;mxEvent.isAltDown(a)&&(l=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
 g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=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,g,l,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var n=null,d=c.getElementsByTagName("img");
 null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var m=!0,q=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,g,l,!0,n,null,m))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;q()},mxEvent.isControlDown(a)):q()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,
@@ -8134,7 +8134,7 @@ this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(ne
 null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,f;if(null==a){f=document.body;var h=document.documentElement;d=(f.clientWidth||h.clientWidth)-3;f=Math.max(f.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,f=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";
 h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,f-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,
 c))}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)+".xml");var g=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".xml":f+".xml";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(A){this.handleError(A,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();g(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();
+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(z){this.handleError(z,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();g(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();
 g(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?g(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)+".xml"),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(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
 9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(x){this.handleError(x)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&
@@ -8155,8 +8155,8 @@ a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,n?mxUtils.bind(
 l.action)this.recentReadyCallback(l.list,l.errorMsg);else{if("textContent"==l.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,h="";if(null!=this.pages)for(n=0;n<this.pages.length;n++){var q=m;this.currentPage!=this.pages[n]&&(q=this.createTemporaryGraph(m.getStylesheet()),q.model.setRoot(this.pages[n].root));h+=this.pages[n].getName()+" "+q.getIndexableText()+" "}else h=m.getIndexableText();this.editor.graph.setEnabled(!0);k.postMessage(JSON.stringify({event:"textContent",data:h,
 message:l}),"*");return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var p=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==
 l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var t=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.message=l;b.data=a;b.xml=encodeURIComponent(t);k.postMessage(JSON.stringify(b),"*")}),w=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(t))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),v=m.getGlobalVariable,C=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:v.apply(this,arguments)};document.body.appendChild(m.container);
-m.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){w(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){w(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(t)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):w(null)}),mxUtils.bind(this,function(){w(null)}))}}else{null!=
+"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(t))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),v=m.getGlobalVariable,B=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:v.apply(this,arguments)};document.body.appendChild(m.container);
+m.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){w(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){w(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(t)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):w(null)}),mxUtils.bind(this,function(){w(null)}))}}else{null!=
 l.xml&&0<l.xml.length&&this.setFileData(l.xml);p=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),p.xml=mxUtils.getXml(h),p.data=this.getFileData(null,null,!0,null,null,null,h),p.format=l.format;else if("html"==l.format)t=this.editor.getGraphXml(),p.data=this.getHtml(t,this.editor.graph),p.xml=mxUtils.getXml(t),p.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;
 h==mxConstants.NONE&&(h=null);p.xml=this.getFileData(!0);p.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(h),
 mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(p),"*")}));return}h="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));p.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(p),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=
@@ -8169,17 +8169,17 @@ mxUtils.bind(this,function(a){y(a)}),mxUtils.bind(this,function(a){this.handleEr
 "2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";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.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",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.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";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.showDialog(this.importCsvDialog.container,
-640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var f={},g=null,h=null,k=null,l=null,m="",p="auto",t="auto",B=null,z=null,G=40,D=40,H=100,I=0,C=this.editor.graph;C.getGraphBounds();for(var F=function(){null!=b?b(fa):(C.setSelectionCells(fa),C.scrollCellToVisible(C.getSelectionCell()))},J=C.getFreeInsertPoint(),N=J.x,L=J.y,J=L,T=null,R="auto",l=null,V=[],Y=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 O=a.indexOf(":");if(0<O){var Q=mxUtils.trim(a.substring(1,O)),M=mxUtils.trim(a.substring(O+1));"label"==Q?T=C.sanitizeHtml(M):"style"==Q?g=M:"parentstyle"==Q?h=M:"identity"==Q&&0<M.length&&"-"!=M?k=M:"parent"==Q&&0<M.length&&"-"!=M?l=M:"namespace"==Q&&0<M.length&&"-"!=M?m=M:"width"==Q?p=M:"height"==Q?t=M:"left"==Q&&0<M.length?B=M:"top"==
-Q&&0<M.length?z=M:"ignore"==Q?Z=M.split(","):"connect"==Q?V.push(JSON.parse(M)):"link"==Q?Y=M:"padding"==Q?I=parseFloat(M):"edgespacing"==Q?G=parseFloat(M):"nodespacing"==Q?D=parseFloat(M):"levelspacing"==Q?H=parseFloat(M):"layout"==Q&&(R=M)}}}var X=this.editor.csvToArray(c[aa]),Q=O=null;if(null!=k||null!=l)for(var P=0;P<X.length;P++)k==X[P]&&(O=P),l==X[P]&&(Q=P);null==T&&(T="%"+X[0]+"%");if(null!=V)for(var U=0;U<V.length;U++)null==f[V[U].to]&&(f[V[U].to]={});C.model.beginUpdate();try{for(P=aa+1;P<
-c.length;P++){var S=this.editor.csvToArray(c[P]);if(null==S){var ba=40<c[P].length?c[P].substring(0,40)+"...":c[P];throw Error(P+" ("+ba+") "+mxResources.get("containsValidationErrors"));}if(S.length==X.length){var K=null,da=null!=O?m+S[O]:null;null!=da&&(K=C.model.getCell(da));null==K&&(K=new mxCell(T,new mxGeometry(N,J,0,0),g||"whiteSpace=wrap;html=1;"),K.vertex=!0,K.id=da);for(var W=0;W<S.length;W++)C.setAttributeForCell(K,X[W],S[W]);C.setAttributeForCell(K,"placeholders","1");K.style=C.replacePlaceholders(K,
-K.style);for(U=0;U<V.length;U++)f[V[U].to][K.getAttribute(V[U].to)]=K;null!=Y&&"link"!=Y&&(C.setLinkForCell(K,K.getAttribute(Y)),C.setAttributeForCell(K,Y,null));C.fireEvent(new mxEventObject("cellsInserted","cells",[K]));var ea=this.editor.graph.getPreferredSizeForCell(K);K.vertex&&(null!=B&&null!=K.getAttribute(B)&&(K.geometry.x=N+parseFloat(K.getAttribute(B))),null!=z&&null!=K.getAttribute(z)&&(K.geometry.y=L+parseFloat(K.getAttribute(z))),"@"==p.charAt(0)&&null!=K.getAttribute(p.substring(1))?
-K.geometry.width=parseFloat(K.getAttribute(p.substring(1))):K.geometry.width="auto"==p?ea.width+I:parseFloat(p),"@"==t.charAt(0)&&null!=K.getAttribute(t.substring(1))?K.geometry.height=parseFloat(K.getAttribute(t.substring(1))):K.geometry.height="auto"==t?ea.height+I:parseFloat(t),J+=K.geometry.height+D);l=null!=Q?C.model.getCell(m+S[Q]):null;null!=l?(l.style=C.replacePlaceholders(l,h),C.addCell(K,l)):d.push(C.addCell(K))}}for(var ga=d.slice(),fa=d.slice(),U=0;U<V.length;U++)for(var ca=V[U],P=0;P<
-d.length;P++){var K=d[P],oa=K.getAttribute(ca.from);if(null!=oa){C.setAttributeForCell(K,ca.from,null);for(var na=oa.split(","),W=0;W<na.length;W++){var ha=f[ca.to][na[W]];null!=ha&&(T=ca.label,null!=ca.fromlabel&&(T=(K.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(ha.getAttribute(ca.tolabel)||"")),fa.push(C.insertEdge(null,null,T||"",ca.invert?ha:K,ca.invert?K:ha,ca.style||C.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?K:ha,ga))}}}if(null!=Z)for(P=0;P<d.length;P++)for(K=
-d[P],W=0;W<Z.length;W++)C.setAttributeForCell(K,mxUtils.trim(Z[W]),null);var ka=new mxParallelEdgeLayout(C);ka.spacing=G;var pa=function(){ka.execute(C.getDefaultParent());for(var a=0;a<d.length;a++){var b=C.getCellGeometry(d[a]);b.x=Math.round(C.snap(b.x));b.y=Math.round(C.snap(b.y));"auto"==p&&(b.width=Math.round(C.snap(b.width)));"auto"==t&&(b.height=Math.round(C.snap(b.height)))}};if("circle"==R){var la=new mxCircleLayout(C);la.resetEdges=!1;var qa=la.isVertexIgnored;la.isVertexIgnored=function(a){return qa.apply(this,
-arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){la.execute(C.getDefaultParent());pa()},!0,F);F=null}else if("horizontaltree"==R||"verticaltree"==R||"auto"==R&&fa.length==2*d.length-1&&1==ga.length){C.view.validate();var ma=new mxCompactTreeLayout(C,"horizontaltree"==R);ma.levelDistance=D;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(C.getDefaultParent(),0<ga.length?ga[0]:null)},!0,F);F=null}else if("horizontalflow"==R||"verticalflow"==R||"auto"==R&&
-1==ga.length){C.view.validate();var ia=new mxHierarchicalLayout(C,"horizontalflow"==R?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ia.intraCellSpacing=D;ia.parallelEdgeSpacing=G;ia.interRankCellSpacing=H;ia.disableEdgeStyle=!1;this.executeLayout(function(){ia.execute(C.getDefaultParent(),fa);C.moveCells(fa,N,L)},!0,F);F=null}else if("organic"==R||"auto"==R&&fa.length>d.length){C.view.validate();var ja=new mxFastOrganicLayout(C);ja.forceConstant=3*D;ja.resetEdges=!1;var ra=ja.isVertexIgnored;
-ja.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ka=new mxParallelEdgeLayout(C);ka.spacing=G;this.executeLayout(function(){ja.execute(C.getDefaultParent());pa()},!0,F);F=null}this.hideDialog()}finally{C.model.endUpdate()}null!=F&&F()}}catch(sa){this.handleError(sa)}};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)&&
+640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var f={},g=null,h=null,k=null,l=null,m="",p="auto",t="auto",C=null,A=null,H=40,D=40,F=100,I=0,B=this.editor.graph;B.getGraphBounds();for(var G=function(){null!=b?b(fa):(B.setSelectionCells(fa),B.scrollCellToVisible(B.getSelectionCell()))},J=B.getFreeInsertPoint(),N=J.x,L=J.y,J=L,T=null,R="auto",l=null,V=[],Y=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 O=a.indexOf(":");if(0<O){var Q=mxUtils.trim(a.substring(1,O)),M=mxUtils.trim(a.substring(O+1));"label"==Q?T=B.sanitizeHtml(M):"style"==Q?g=M:"parentstyle"==Q?h=M:"identity"==Q&&0<M.length&&"-"!=M?k=M:"parent"==Q&&0<M.length&&"-"!=M?l=M:"namespace"==Q&&0<M.length&&"-"!=M?m=M:"width"==Q?p=M:"height"==Q?t=M:"left"==Q&&0<M.length?C=M:"top"==
+Q&&0<M.length?A=M:"ignore"==Q?Z=M.split(","):"connect"==Q?V.push(JSON.parse(M)):"link"==Q?Y=M:"padding"==Q?I=parseFloat(M):"edgespacing"==Q?H=parseFloat(M):"nodespacing"==Q?D=parseFloat(M):"levelspacing"==Q?F=parseFloat(M):"layout"==Q&&(R=M)}}}var X=this.editor.csvToArray(c[aa]),Q=O=null;if(null!=k||null!=l)for(var P=0;P<X.length;P++)k==X[P]&&(O=P),l==X[P]&&(Q=P);null==T&&(T="%"+X[0]+"%");if(null!=V)for(var U=0;U<V.length;U++)null==f[V[U].to]&&(f[V[U].to]={});B.model.beginUpdate();try{for(P=aa+1;P<
+c.length;P++){var S=this.editor.csvToArray(c[P]);if(null==S){var ba=40<c[P].length?c[P].substring(0,40)+"...":c[P];throw Error(P+" ("+ba+") "+mxResources.get("containsValidationErrors"));}if(S.length==X.length){var K=null,da=null!=O?m+S[O]:null;null!=da&&(K=B.model.getCell(da));null==K&&(K=new mxCell(T,new mxGeometry(N,J,0,0),g||"whiteSpace=wrap;html=1;"),K.vertex=!0,K.id=da);for(var W=0;W<S.length;W++)B.setAttributeForCell(K,X[W],S[W]);B.setAttributeForCell(K,"placeholders","1");K.style=B.replacePlaceholders(K,
+K.style);for(U=0;U<V.length;U++)f[V[U].to][K.getAttribute(V[U].to)]=K;null!=Y&&"link"!=Y&&(B.setLinkForCell(K,K.getAttribute(Y)),B.setAttributeForCell(K,Y,null));B.fireEvent(new mxEventObject("cellsInserted","cells",[K]));var ea=this.editor.graph.getPreferredSizeForCell(K);K.vertex&&(null!=C&&null!=K.getAttribute(C)&&(K.geometry.x=N+parseFloat(K.getAttribute(C))),null!=A&&null!=K.getAttribute(A)&&(K.geometry.y=L+parseFloat(K.getAttribute(A))),"@"==p.charAt(0)&&null!=K.getAttribute(p.substring(1))?
+K.geometry.width=parseFloat(K.getAttribute(p.substring(1))):K.geometry.width="auto"==p?ea.width+I:parseFloat(p),"@"==t.charAt(0)&&null!=K.getAttribute(t.substring(1))?K.geometry.height=parseFloat(K.getAttribute(t.substring(1))):K.geometry.height="auto"==t?ea.height+I:parseFloat(t),J+=K.geometry.height+D);l=null!=Q?B.model.getCell(m+S[Q]):null;null!=l?(l.style=B.replacePlaceholders(l,h),B.addCell(K,l)):d.push(B.addCell(K))}}for(var ga=d.slice(),fa=d.slice(),U=0;U<V.length;U++)for(var ca=V[U],P=0;P<
+d.length;P++){var K=d[P],oa=K.getAttribute(ca.from);if(null!=oa){B.setAttributeForCell(K,ca.from,null);for(var na=oa.split(","),W=0;W<na.length;W++){var ha=f[ca.to][na[W]];null!=ha&&(T=ca.label,null!=ca.fromlabel&&(T=(K.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(ha.getAttribute(ca.tolabel)||"")),fa.push(B.insertEdge(null,null,T||"",ca.invert?ha:K,ca.invert?K:ha,ca.style||B.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?K:ha,ga))}}}if(null!=Z)for(P=0;P<d.length;P++)for(K=
+d[P],W=0;W<Z.length;W++)B.setAttributeForCell(K,mxUtils.trim(Z[W]),null);var ka=new mxParallelEdgeLayout(B);ka.spacing=H;var pa=function(){ka.execute(B.getDefaultParent());for(var a=0;a<d.length;a++){var b=B.getCellGeometry(d[a]);b.x=Math.round(B.snap(b.x));b.y=Math.round(B.snap(b.y));"auto"==p&&(b.width=Math.round(B.snap(b.width)));"auto"==t&&(b.height=Math.round(B.snap(b.height)))}};if("circle"==R){var la=new mxCircleLayout(B);la.resetEdges=!1;var qa=la.isVertexIgnored;la.isVertexIgnored=function(a){return qa.apply(this,
+arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){la.execute(B.getDefaultParent());pa()},!0,G);G=null}else if("horizontaltree"==R||"verticaltree"==R||"auto"==R&&fa.length==2*d.length-1&&1==ga.length){B.view.validate();var ma=new mxCompactTreeLayout(B,"horizontaltree"==R);ma.levelDistance=D;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(B.getDefaultParent(),0<ga.length?ga[0]:null)},!0,G);G=null}else if("horizontalflow"==R||"verticalflow"==R||"auto"==R&&
+1==ga.length){B.view.validate();var ia=new mxHierarchicalLayout(B,"horizontalflow"==R?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ia.intraCellSpacing=D;ia.parallelEdgeSpacing=H;ia.interRankCellSpacing=F;ia.disableEdgeStyle=!1;this.executeLayout(function(){ia.execute(B.getDefaultParent(),fa);B.moveCells(fa,N,L)},!0,G);G=null}else if("organic"==R||"auto"==R&&fa.length>d.length){B.view.validate();var ja=new mxFastOrganicLayout(B);ja.forceConstant=3*D;ja.resetEdges=!1;var ra=ja.isVertexIgnored;
+ja.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ka=new mxParallelEdgeLayout(B);ka.spacing=H;this.executeLayout(function(){ja.execute(B.getDefaultParent());pa()},!0,G);G=null}this.hideDialog()}finally{B.model.endUpdate()}null!=G&&G()}}catch(sa){this.handleError(sa)}};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,480,130,!0,!0);a.init()};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.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 f=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 f.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&
@@ -8192,35 +8192,35 @@ this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").
 this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);
 mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var f=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=f.status,b;a==f.CHECKING&&(a=f.DOWNLOADING);switch(a){case f.UNCACHED:b="";break;case f.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case f.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+
 IMAGE_PATH+'/spin.gif"/>';break;case f.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case f.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(f,"checking",b);mxEvent.addListener(f,"noupdate",b);mxEvent.addListener(f,"downloading",
-b);mxEvent.addListener(f,"progress",b);mxEvent.addListener(f,"cached",b);mxEvent.addListener(f,"updateready",b);mxEvent.addListener(f,"obsolete",b);mxEvent.addListener(f,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;
-EditorUi.prototype.updateActionStates=function(){t.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);
+b);mxEvent.addListener(f,"progress",b);mxEvent.addListener(f,"cached",b);mxEvent.addListener(f,"updateready",b);mxEvent.addListener(f,"obsolete",b);mxEvent.addListener(f,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){p.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 p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,f,h,k){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(f,h,k)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*h/d.view.scale),
+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 t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,f,h,k){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(f,h,k)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*h/d.view.scale),
 n=Math.floor(l.height*h/d.view.scale);g.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=f?f:"none")+"&w="+m+"&h="+n+"&border="+k+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
 c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var f=this.getFutureCellForEdit(c.model,a,d.source.id);f!=d.source&&(d.source=f)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var f=b.changes.length-1;0<=f;f--){var g=b.changes[f];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==c){a.contains(g.previous)&&
 (d=g.child);break}}return d}})();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};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,c,b,f,h){var k={},m=[],t={},p={},d={},g={};if(null!=f&&null!=f[EditorUi.DIFF_UPDATE])for(var n in f[EditorUi.DIFF_UPDATE])k[n]=f[EditorUi.DIFF_UPDATE][n];if(null!=c[EditorUi.DIFF_REMOVE])for(f=0;f<c[EditorUi.DIFF_REMOVE].length;f++)p[c[EditorUi.DIFF_REMOVE][f]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(f=0;f<c[EditorUi.DIFF_INSERT].length;f++)t[c[EditorUi.DIFF_INSERT][f].previous]=c[EditorUi.DIFF_INSERT][f];if(null!=c[EditorUi.DIFF_UPDATE])for(n in c[EditorUi.DIFF_UPDATE])f=
-c[EditorUi.DIFF_UPDATE][n],null!=f.previous&&(g[f.previous]=n);if(null!=a){var q="";for(f=0;f<a.length;f++){var u=a[f].getId();d[u]=a[f];null!=g[q]||p[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(g[q]=u);q=u}}var v={},w=mxUtils.bind(this,function(a){var f=null!=a?a.getId():"";if(null!=a&&!v[f]){v[f]=!0;m.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][f]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name),
-null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,k[a.getId()],h),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=g[f];null!=a&&(delete g[f],w(d[a]));a=t[f];null!=a&&(delete t[f],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=d[a.getId()];null==c?w(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});w();for(n in g)w(d[g[n]]),
-delete g[n];for(n in t)y(t[n]),delete t[n];return m};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
-EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=f[a];null==b&&(b={inserted:[],moved:{}},f[a]=b);return b}var f={};if(null!=c[EditorUi.DIFF_INSERT])for(var h=0;h<c[EditorUi.DIFF_INSERT].length;h++){var k=c[EditorUi.DIFF_INSERT][h],m=null!=k.parent?k.parent:"",t=null!=k.previous?k.previous:"";b(m).inserted[t]=k}if(null!=c[EditorUi.DIFF_UPDATE])for(var p in c[EditorUi.DIFF_UPDATE])k=c[EditorUi.DIFF_UPDATE][p],null!=k.previous&&(m=k.parent,null==m&&(h=a.getCell(p),null!=h&&(h=
-a.getParent(h),null!=h&&(m=h.getId()))),null!=m&&(b(m).moved[k.previous]=p));return f};
-EditorUi.prototype.patchPage=function(a,c,b,f){var h=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),k=this.createParentLookup(h,c);h.beginUpdate();try{var m=h.updateEdgeParent,t=new mxDictionary,p=[];h.updateEdgeParent=function(a,b){!t.get(a)&&f&&(t.put(a,!0),p.push(a))};var d=k[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,n=null;null!=g&&(n=this.getCellForJson(g));if(null==n){var q=null!=d&&null!=d.moved?d.moved[""]:null;null!=q&&(n=h.getCell(q))}null!=n&&(h.setRoot(n),
+EditorUi.prototype.patchPages=function(a,c,b,f,h){var k={},m=[],p={},t={},d={},g={};if(null!=f&&null!=f[EditorUi.DIFF_UPDATE])for(var n in f[EditorUi.DIFF_UPDATE])k[n]=f[EditorUi.DIFF_UPDATE][n];if(null!=c[EditorUi.DIFF_REMOVE])for(f=0;f<c[EditorUi.DIFF_REMOVE].length;f++)t[c[EditorUi.DIFF_REMOVE][f]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(f=0;f<c[EditorUi.DIFF_INSERT].length;f++)p[c[EditorUi.DIFF_INSERT][f].previous]=c[EditorUi.DIFF_INSERT][f];if(null!=c[EditorUi.DIFF_UPDATE])for(n in c[EditorUi.DIFF_UPDATE])f=
+c[EditorUi.DIFF_UPDATE][n],null!=f.previous&&(g[f.previous]=n);if(null!=a){var q="";for(f=0;f<a.length;f++){var u=a[f].getId();d[u]=a[f];null!=g[q]||t[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(g[q]=u);q=u}}var v={},w=mxUtils.bind(this,function(a){var f=null!=a?a.getId():"";if(null!=a&&!v[f]){v[f]=!0;m.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][f]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name),
+null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,k[a.getId()],h),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=g[f];null!=a&&(delete g[f],w(d[a]));a=p[f];null!=a&&(delete p[f],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=d[a.getId()];null==c?w(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});w();for(n in g)w(d[g[n]]),
+delete g[n];for(n in p)y(p[n]),delete p[n];return m};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
+EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=f[a];null==b&&(b={inserted:[],moved:{}},f[a]=b);return b}var f={};if(null!=c[EditorUi.DIFF_INSERT])for(var h=0;h<c[EditorUi.DIFF_INSERT].length;h++){var k=c[EditorUi.DIFF_INSERT][h],m=null!=k.parent?k.parent:"",p=null!=k.previous?k.previous:"";b(m).inserted[p]=k}if(null!=c[EditorUi.DIFF_UPDATE])for(var t in c[EditorUi.DIFF_UPDATE])k=c[EditorUi.DIFF_UPDATE][t],null!=k.previous&&(m=k.parent,null==m&&(h=a.getCell(t),null!=h&&(h=
+a.getParent(h),null!=h&&(m=h.getId()))),null!=m&&(b(m).moved[k.previous]=t));return f};
+EditorUi.prototype.patchPage=function(a,c,b,f){var h=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),k=this.createParentLookup(h,c);h.beginUpdate();try{var m=h.updateEdgeParent,p=new mxDictionary,t=[];h.updateEdgeParent=function(a,b){!p.get(a)&&f&&(p.put(a,!0),t.push(a))};var d=k[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,n=null;null!=g&&(n=this.getCellForJson(g));if(null==n){var q=null!=d&&null!=d.moved?d.moved[""]:null;null!=q&&(n=h.getCell(q))}null!=n&&(h.setRoot(n),
 a.root=n);this.patchCellRecursive(a,h,h.root,k,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=h.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&h.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var w=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(q in c[EditorUi.DIFF_UPDATE])this.patchCell(h,h.getCell(q),c[EditorUi.DIFF_UPDATE][q],null!=w?w[q]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)g=c[EditorUi.DIFF_INSERT][u],
-v=h.getCell(g.id),null!=v&&(h.setTerminal(v,h.getCell(g.source),!0),h.setTerminal(v,h.getCell(g.target),!1));h.updateEdgeParent=m;if(f&&0<p.length)for(u=0;u<p.length;u++)h.contains(p[u])&&h.updateEdgeParent(p[u])}finally{h.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,c,b,f,h){if(null!=b){for(var k=f[b.getId()],m=null!=k&&null!=k.inserted?k.inserted:{},t=null!=k&&null!=k.moved?k.moved:{},p=0,k=c.getChildCount(b),d="",g=0;g<k;g++){var n=c.getChildAt(b,g).getId();null==t[d]&&(null==h[EditorUi.DIFF_UPDATE]||null==h[EditorUi.DIFF_UPDATE][n]||null==h[EditorUi.DIFF_UPDATE][n].previous&&null==h[EditorUi.DIFF_UPDATE][n].parent)&&(t[d]=n);d=n}var q=mxUtils.bind(this,function(d){var g=null!=d?d.getId():"";null!=d&&(c.getChildAt(b,
-p)!=d&&c.add(b,d,p),this.patchCellRecursive(a,c,d,f,h),p++);d=t[g];null!=d&&(delete t[g],q(c.getCell(d)));d=m[g];null!=d&&(delete m[g],q(this.getCellForJson(d)))});q();for(var u in t)q(c.getCell(t[u])),delete t[u];for(u in m)q(this.getCellForJson(m[u])),delete m[u]}};
+v=h.getCell(g.id),null!=v&&(h.setTerminal(v,h.getCell(g.source),!0),h.setTerminal(v,h.getCell(g.target),!1));h.updateEdgeParent=m;if(f&&0<t.length)for(u=0;u<t.length;u++)h.contains(t[u])&&h.updateEdgeParent(t[u])}finally{h.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(a,c,b,f,h){if(null!=b){for(var k=f[b.getId()],m=null!=k&&null!=k.inserted?k.inserted:{},p=null!=k&&null!=k.moved?k.moved:{},t=0,k=c.getChildCount(b),d="",g=0;g<k;g++){var n=c.getChildAt(b,g).getId();null==p[d]&&(null==h[EditorUi.DIFF_UPDATE]||null==h[EditorUi.DIFF_UPDATE][n]||null==h[EditorUi.DIFF_UPDATE][n].previous&&null==h[EditorUi.DIFF_UPDATE][n].parent)&&(p[d]=n);d=n}var q=mxUtils.bind(this,function(d){var g=null!=d?d.getId():"";null!=d&&(c.getChildAt(b,
+t)!=d&&c.add(b,d,t),this.patchCellRecursive(a,c,d,f,h),t++);d=p[g];null!=d&&(delete p[g],q(c.getCell(d)));d=m[g];null!=d&&(delete m[g],q(this.getCellForJson(d)))});q();for(var u in p)q(c.getCell(p[u])),delete p[u];for(u in m)q(this.getCellForJson(m[u])),delete m[u]}};
 EditorUi.prototype.patchCell=function(a,c,b,f){if(null!=c&&null!=b){if(null==f||null==f.xmlValue&&(null==f.value||""==f.value))"value"in b?a.setValue(c,b.value):null!=b.xmlValue&&a.setValue(c,mxUtils.parseXml(b.xmlValue).documentElement);null!=f&&null!=f.style||null==b.style||a.setStyle(c,b.style);null!=b.visible&&a.setVisible(c,1==b.visible);null!=b.collapsed&&a.setCollapsed(c,1==b.collapsed);null!=b.vertex&&(c.vertex=1==b.vertex);null!=b.edge&&(c.edge=1==b.edge);null!=b.connectable&&(c.connectable=
 1==b.connectable);null!=b.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(b.geometry).documentElement));null!=b.source&&a.setTerminal(c,a.getCell(b.source),!0);null!=b.target&&a.setTerminal(c,a.getCell(b.target),!1);for(var h in b)this.cellProperties[h]||(c[h]=b[h])}};
 EditorUi.prototype.getPagesForNode=function(a,c){var b=this.editor.extractGraphModel(a,!0);null!=b&&(a=b);for(var b=a.getElementsByTagName(c||"diagram"),f=[],h=0;h<b.length;h++){var k=new DiagramPage(b[h]);this.updatePageRoot(k);f.push(k)}return f};
-EditorUi.prototype.diffPages=function(a,c){for(var b=[],f=[],h={},k={},m={},t=null,p=0;p<c.length;p++)k[c[p].getId()]={page:c[p],prev:t},t=c[p];t=null;for(p=0;p<a.length;p++){var d=a[p].getId(),g=k[d];if(null==g)f.push(d);else{var n=this.diffPage(a[p],g.page),q={};0<Object.keys(n).length&&(q.cells=n);n=this.diffViewState(a[p],g.page);0<Object.keys(n).length&&(q.view=n);if((null!=g.prev?null==t:null!=t)||null!=t&&null!=g.prev&&t.getId()!=g.prev.getId())q.previous=null!=g.prev?g.prev.getId():"";null!=
-g.page.getName()&&a[p].getName()!=g.page.getName()&&(q.name=g.page.getName());0<Object.keys(q).length&&(m[d]=q)}delete k[a[p].getId()];t=a[p]}for(d in k)g=k[d],b.push({data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});0<Object.keys(m).length&&(h[EditorUi.DIFF_UPDATE]=m);0<f.length&&(h[EditorUi.DIFF_REMOVE]=f);0<b.length&&(h[EditorUi.DIFF_INSERT]=b);return h};
+EditorUi.prototype.diffPages=function(a,c){for(var b=[],f=[],h={},k={},m={},p=null,t=0;t<c.length;t++)k[c[t].getId()]={page:c[t],prev:p},p=c[t];p=null;for(t=0;t<a.length;t++){var d=a[t].getId(),g=k[d];if(null==g)f.push(d);else{var n=this.diffPage(a[t],g.page),q={};0<Object.keys(n).length&&(q.cells=n);n=this.diffViewState(a[t],g.page);0<Object.keys(n).length&&(q.view=n);if((null!=g.prev?null==p:null!=p)||null!=p&&null!=g.prev&&p.getId()!=g.prev.getId())q.previous=null!=g.prev?g.prev.getId():"";null!=
+g.page.getName()&&a[t].getName()!=g.page.getName()&&(q.name=g.page.getName());0<Object.keys(q).length&&(m[d]=q)}delete k[a[t].getId()];p=a[t]}for(d in k)g=k[d],b.push({data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});0<Object.keys(m).length&&(h[EditorUi.DIFF_UPDATE]=m);0<f.length&&(h[EditorUi.DIFF_REMOVE]=f);0<b.length&&(h[EditorUi.DIFF_INSERT]=b);return h};
 EditorUi.prototype.createCellLookup=function(a,c,b){b=null!=b?b:{};b[a.getId()]={cell:a,prev:c};var f=a.getChildCount();c=null;for(var h=0;h<f;h++){var k=a.getChildAt(h);this.createCellLookup(k,c,b);c=k}return b};
-EditorUi.prototype.diffCellRecursive=function(a,c,b,f,h){f=null!=f?f:{};var k=b[a.getId()];delete b[a.getId()];if(null==k)h.push(a.getId());else{var m=this.diffCell(a,k.cell);if(null!=m.parent||(null!=k.prev?null==c:null!=c)||null!=c&&null!=k.prev&&c.getId()!=k.prev.getId())m.previous=null!=k.prev?k.prev.getId():"";0<Object.keys(m).length&&(f[a.getId()]=m)}k=a.getChildCount();c=null;for(m=0;m<k;m++){var t=a.getChildAt(m);this.diffCellRecursive(t,c,b,f,h);c=t}return f};
-EditorUi.prototype.diffPage=function(a,c){var b=[],f=[],h={};this.updatePageRoot(a);this.updatePageRoot(c);var k=this.createCellLookup(c.root),m=this.diffCellRecursive(a.root,null,k,m,f),t;for(t in k){var p=k[t];b.push(this.getJsonForCell(p.cell,p.prev))}0<Object.keys(m).length&&(h[EditorUi.DIFF_UPDATE]=m);0<f.length&&(h[EditorUi.DIFF_REMOVE]=f);0<b.length&&(h[EditorUi.DIFF_INSERT]=b);return h};
-EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,f=c.viewState,h={};c==this.currentPage&&(f=this.editor.graph.getViewState());if(null!=b&&null!=f)for(var k in this.viewStateProperties){var m=JSON.stringify(b[k]),t=JSON.stringify(f[k]);m!=t&&(h[k]=t)}return h};
+EditorUi.prototype.diffCellRecursive=function(a,c,b,f,h){f=null!=f?f:{};var k=b[a.getId()];delete b[a.getId()];if(null==k)h.push(a.getId());else{var m=this.diffCell(a,k.cell);if(null!=m.parent||(null!=k.prev?null==c:null!=c)||null!=c&&null!=k.prev&&c.getId()!=k.prev.getId())m.previous=null!=k.prev?k.prev.getId():"";0<Object.keys(m).length&&(f[a.getId()]=m)}k=a.getChildCount();c=null;for(m=0;m<k;m++){var p=a.getChildAt(m);this.diffCellRecursive(p,c,b,f,h);c=p}return f};
+EditorUi.prototype.diffPage=function(a,c){var b=[],f=[],h={};this.updatePageRoot(a);this.updatePageRoot(c);var k=this.createCellLookup(c.root),m=this.diffCellRecursive(a.root,null,k,m,f),p;for(p in k){var t=k[p];b.push(this.getJsonForCell(t.cell,t.prev))}0<Object.keys(m).length&&(h[EditorUi.DIFF_UPDATE]=m);0<f.length&&(h[EditorUi.DIFF_REMOVE]=f);0<b.length&&(h[EditorUi.DIFF_INSERT]=b);return h};
+EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,f=c.viewState,h={};c==this.currentPage&&(f=this.editor.graph.getViewState());if(null!=b&&null!=f)for(var k in this.viewStateProperties){var m=JSON.stringify(b[k]),p=JSON.stringify(f[k]);m!=p&&(h[k]=p)}return h};
 EditorUi.prototype.getCellForJson=function(a){var c=null!=a.geometry?this.codec.decode(mxUtils.parseXml(a.geometry).documentElement):null,b=a.value;null!=a.xmlValue&&(b=mxUtils.parseXml(a.xmlValue).documentElement);c=new mxCell(b,c,a.style);c.connectable=0!=a.connectable;c.collapsed=1==a.collapsed;c.visible=0!=a.visible;c.vertex=1==a.vertex;c.edge=1==a.edge;c.id=a.id;for(var f in a)this.cellProperties[f]||(c[f]=a[f]);return c};
 EditorUi.prototype.getJsonForCell=function(a,c){var b={id:a.getId()};a.vertex&&(b.vertex=1);a.edge&&(b.edge=1);a.connectable||(b.connectable=0);null!=a.parent&&(b.parent=a.parent.getId());null!=c&&(b.previous=c.getId());null!=a.source&&(b.source=a.source.getId());null!=a.target&&(b.target=a.target.getId());null!=a.style&&(b.style=a.style);null!=a.geometry&&(b.geometry=mxUtils.getXml(this.codec.encode(a.geometry)));a.collapsed&&(b.collapsed=1);a.visible||(b.visible=0);null!=a.value&&("object"===typeof a.value&&
 "number"===typeof a.value.nodeType&&"string"===typeof a.value.nodeName&&"function"===typeof a.value.getAttribute?b.xmlValue=mxUtils.getXml(a.value):b.value=a.value);for(var f in a)this.cellProperties[f]||"function"===typeof a[f]||(b[f]=a[f]);return b};
@@ -8258,26 +8258,26 @@ DrawioFileSync.prototype.handleMessageData=function(a){"desc"==a.a?this.file.sav
 DrawioFileSync.prototype.fileChangedNotify=function(){if(this.file.savingFile)this.remoteFileChanged=!0;else var a=this.fileChanged(mxUtils.bind(this,function(a){this.updateStatus()}),mxUtils.bind(this,function(a){this.file.handleFileError(a)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=a}))};
 DrawioFileSync.prototype.fileChanged=function(a,c,b){var f=window.setTimeout(mxUtils.bind(this,function(){this.ui.getCurrentFile()!=this.file||this.file.sync!=this?null!=c&&c():null!=b&&b()||this.file.loadPatchDescriptor(mxUtils.bind(this,function(f){this.catchup(this.file.getDescriptorEtag(f),this.file.getDescriptorSecret(f),a,c,b)}),c)}),0);return this.notifyThread=f};
 DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorEtag(a,this.file.getCurrentEtag()),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,c,b,f,h){var k=this.file.getCurrentEtag();if(k==a)null!=b&&b();else if(this.ui.getCurrentFile()!=this.file||this.file.sync!=this)null!=f&&f();else if(null==h||!h()){var m=0,t=!1,p=mxUtils.bind(this,function(){k==a?null!=b&&b():this.ui.getCurrentFile()!=this.file||this.file.sync!=this?null!=f&&f():null!=h&&h()||mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+
-encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;if(k==a)null!=b&&b();else if(this.ui.getCurrentFile()!=this.file||this.file.sync!=this)null!=f&&f();else if(null==h||!h()){var d=null,n=[],q=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var u=JSON.parse(c.getText());if(null!=u&&0<u.length)for(var v=0;v<u.length;v++){var w=this.stringToObject(u[v]);if(w.v>DrawioFileSync.PROTOCOL){t=!0;q=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&
-null!=w.d)d=w.d.checksum,q.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=d,n.push(JSON.stringify(w.d.details)));else{t=!0;q=[];break}}}catch(y){q=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,d,a,b,f,h,n)):m<=this.maxCacheReadyRetries&&!t&&401!=c.getStatus()?(m++,this.file.stats.cacheMiss++,window.setTimeout(p,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(b,f,h))}catch(y){null!=f&&f(y)}}}))});
-window.setTimeout(p,this.cacheReadyDelay)}};DrawioFileSync.prototype.reload=function(a,c,b,f){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!=c&&c(a)}),b,f)};
+DrawioFileSync.prototype.catchup=function(a,c,b,f,h){var k=this.file.getCurrentEtag();if(k==a)null!=b&&b();else if(this.ui.getCurrentFile()!=this.file||this.file.sync!=this)null!=f&&f();else if(null==h||!h()){var m=0,p=!1,t=mxUtils.bind(this,function(){k!=this.file.getCurrentEtag()?null!=b&&b():this.ui.getCurrentFile()!=this.file||this.file.sync!=this?null!=f&&f():null!=h&&h()||mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(a)+
+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;if(k!=this.file.getCurrentEtag())null!=b&&b();else if(this.ui.getCurrentFile()!=this.file||this.file.sync!=this)null!=f&&f();else if(null==h||!h()){var d=null,n=[],q=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var u=JSON.parse(c.getText());if(null!=u&&0<u.length)for(var v=0;v<u.length;v++){var w=this.stringToObject(u[v]);if(w.v>DrawioFileSync.PROTOCOL){p=
+!0;q=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&null!=w.d)d=w.d.checksum,q.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=d,n.push(JSON.stringify(w.d.details)));else{p=!0;q=[];break}}}catch(y){q=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,d,a,b,f,h,n)):m<=this.maxCacheReadyRetries&&!p&&401!=c.getStatus()?(m++,this.file.stats.cacheMiss++,window.setTimeout(t,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+this.reload(b,f,h))}catch(y){null!=f&&f(y)}}}))});window.setTimeout(t,this.cacheReadyDelay)}};DrawioFileSync.prototype.reload=function(a,c,b,f){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!=c&&c(a)}),b,f)};
 DrawioFileSync.prototype.merge=function(a,c,b,f,h,k,m){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.checkShadow(this.file.shadowPages);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(!this.file.ignorePatches(a)){for(k=0;k<a.length;k++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[k]);k={};var t=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,k):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",m,k,"patches",a,"checksum",c==t,c);if(null!=c&&c!=t){var p=this.ui.hashValue(this.file.getCurrentEtag()),d=this.ui.hashValue(b);this.file.checksumError(h,a,"From: "+p+"\nTo: "+d+(null!=m&&0<m.length?"\nDetails: "+m.join(", "):"")+"\nChecksum: "+c+
-"\nCurrent: "+t+(null!=k?"\nCurrent Details: "+JSON.stringify(k):""),b);return}this.file.stats.lastMerge=m;this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=f&&f()}catch(g){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=h&&h(g);try{this.file.sendErrorReport("Error in merge","Patches:\n"+this.file.compressReportData(JSON.stringify(a,
-null,2)),g)}catch(n){}}};
+a[k]);k={};var p=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,k):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",m,k,"patches",a,"checksum",c==p,c);if(null!=c&&c!=p){var t=this.ui.hashValue(this.file.getCurrentEtag()),d=this.ui.hashValue(b);k.inConflictState=this.file.inConflictState;k.invalidChecksum=this.file.invalidChecksum;this.file.checksumError(h,a,"From: "+
+t+"\nTo: "+d+(null!=m&&0<m.length?"\nDetails: "+m.join(", "):"")+"\nChecksum: "+c+"\nCurrent: "+p+(null!=k?"\nCurrent Details: "+JSON.stringify(k):""),b);return}this.file.stats.lastMerge=m;this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=f&&f()}catch(g){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=h&&h(g);try{this.file.sendErrorReport("Error in merge",
+"Patches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),g)}catch(n){}}};
 DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),f=this.objectToString({});mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(f));this.file.stats.bytesSent+=f.length;this.file.stats.msgSent++}this.updateStatus()};
 DrawioFileSync.prototype.objectToString=function(a){a=this.ui.editor.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(this.ui.editor.graph.decompress(a))};
 DrawioFileSync.prototype.fileSaved=function(a,c,b,f){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.redirectDialogShowing&&(this.start(),null!=this.channelId)){var h=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),k={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};f=this.ui.getHashValueForPages(a,
-k);var m=this.ui.diffPages(h,a);k.lastChecksum=this.ui.getHashValueForPages(h);c=this.file.getDescriptorEtag(c);h=this.file.getCurrentEtag();k.from=this.ui.hashValue(c);k.to=this.ui.hashValue(h);var k=this.objectToString(this.createMessage({patch:m,checksum:f,details:k})),t=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),p=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=k.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(h)+"&msg="+encodeURIComponent(t)+(null!=p?"&secret="+encodeURIComponent(p):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",h,k.length,"bytes","diff",m,"checksum",f)}this.file.shadowPages=a;null!=b&&b()};
+k);h=this.ui.diffPages(h,a);c=this.file.getDescriptorEtag(c);var m=this.file.getCurrentEtag();k.from=this.ui.hashValue(c);k.to=this.ui.hashValue(m);var k=this.objectToString(this.createMessage({patch:h,checksum:f,details:k})),p=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),t=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=k.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+
+"&to="+encodeURIComponent(m)+"&msg="+encodeURIComponent(p)+(null!=t?"&secret="+encodeURIComponent(t):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",m,k.length,"bytes","diff",h,"checksum",f)}this.file.shadowPages=a;null!=b&&b()};
 DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
 DrawioFileSync.prototype.fileConflict=function(a,c,b){this.catchupRetryCount++;if(this.catchupRetryCount<this.maxCatchupRetries)if(this.file.stats.conflicts++,null!=a){var f=this.file.getDescriptorEtag(a);a=this.file.getDescriptorSecret(a);this.catchup(f,a,c,b)}else this.fileChanged(c,b);else this.catchupRetryCount=0,this.file.stats.timeouts++,null!=b&&b({message:mxResources.get("timeout")})};
 DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
 DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.file.getCurrentUser(),c={a:"leave"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),
 this.onlineListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),
 mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=null;try{f=window.open(a)}catch(t){}null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=null;try{f=window.open(a)}catch(p){}null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
 App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(f){null!=window.console&&console.log("Plugin Error:",f,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
 App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";
 App.GOOGLE_APIS="client,drive-share";
@@ -8294,9 +8294,9 @@ null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.o
 urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))},function(a){document.getElementById("geStatus").innerHTML=
 "Error loading page. <a>Please try refreshing.</a>";document.getElementById("geStatus").getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}})}function f(){mxResources.loadDefaultBundle=!1;b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,f){EditorUi.logError(a,b,c,d,f)};if("1"==
 urlParams.embed||"1"==urlParams.lightbox){var h=document.getElementById("geInfo");null!=h&&h.parentNode.removeChild(h)}if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache)mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),h=document.createElement("iframe"),h.setAttribute("width","0"),h.setAttribute("height","0"),h.setAttribute("src","offline.html"),document.body.appendChild(h);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=
-DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var h=null!=mxSettings.settings?mxSettings.getPlugins():null,k={},m=urlParams.p;App.initPluginCallback();if(null!=m)for(var t=m.split(";"),m=0;m<t.length;m++){var p=App.pluginRegistry[t[m]];null!=p&&null==k[p]?(k[p]=!0,mxscript(drawDevUrl+p)):null!=window.console&&console.log("Unknown plugin:",t[m])}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);
-if(null!=h&&0<h.length&&"0"!=urlParams.plugins){for(var t=window.location.protocol+"//"+window.location.host,d=!0,m=0;m<h.length&&d;m++)"/"!=h[m].charAt(0)&&h[m].substring(0,t.length)!=t&&(d=!1);if(d||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",[h.join("\n")]).replace(/\\n/g,"\n")))for(m=
-0;m<h.length;m++)try{null==k[h[m]]&&(k[p]=!0,mxscript(h[m]))}catch(q){}}}"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&&
+DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var h=null!=mxSettings.settings?mxSettings.getPlugins():null,k={},m=urlParams.p;App.initPluginCallback();if(null!=m)for(var p=m.split(";"),m=0;m<p.length;m++){var t=App.pluginRegistry[p[m]];null!=t&&null==k[t]?(k[t]=!0,mxscript(drawDevUrl+t)):null!=window.console&&console.log("Unknown plugin:",p[m])}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);
+if(null!=h&&0<h.length&&"0"!=urlParams.plugins){for(var p=window.location.protocol+"//"+window.location.host,d=!0,m=0;m<h.length&&d;m++)"/"!=h[m].charAt(0)&&h[m].substring(0,p.length)!=p&&(d=!1);if(d||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",[h.join("\n")]).replace(/\\n/g,"\n")))for(m=
+0;m<h.length;m++)try{null==k[h[m]]&&(k[t]=!0,mxscript(h[m]))}catch(q){}}}"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,n=function(a){if(a.source==g)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(b.config,!0),mxSettings.load(),f())}catch(v){null!=window.console&&console.log("Error in configuration: "+v)}};mxEvent.addListener(window,"message",n);g.postMessage(JSON.stringify({event:"load"}),"*")}else f()};mxUtils.extend(App,EditorUi);
 App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";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=":
@@ -8328,8 +8328,8 @@ App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{
 App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
 App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,b=0;256>b;b++){c=b;for(var f=0;8>f;f++)c=c&1?3988292384^c>>>1:c>>>1;a[b]=c}return a};
 App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),h=f.getGlobalVariable,k=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:h.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!f.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,f),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),t=f.getGraphBounds(),p=a/t.width,p=Math.min(1,Math.min(3*a/(4*t.height),p)),d=Math.floor(t.x),g=Math.floor(t.y);m.setAttribute("width",Math.ceil(p*(t.width+4)));m.setAttribute("height",Math.ceil(p*(t.height+4)));var n=m.getContext("2d");
-n.scale(p,p);n.translate(-d,-g);var q=f.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(d,g,Math.ceil(t.width+4),Math.ceil(t.height+4));n.restore();var u=new mxJsCanvas(m),v=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a,
+function(a){f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,f),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=f.getGraphBounds(),t=a/p.width,t=Math.min(1,Math.min(3*a/(4*p.height),t)),d=Math.floor(p.x),g=Math.floor(p.y);m.setAttribute("width",Math.ceil(t*(p.width+4)));m.setAttribute("height",Math.ceil(t*(p.height+4)));var n=m.getContext("2d");
+n.scale(t,t);n.translate(-d,-g);var q=f.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(d,g,Math.ceil(p.width+4),Math.ceil(p.height+4));n.restore();var u=new mxJsCanvas(m),v=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a,
 b){};w.drawState(f.getView().getState(f.model.root),v);v.finish(mxUtils.bind(this,function(){w.drawState(f.getView().getState(f.model.root),u);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);c(m)}));b=!0}}catch(y){f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}return b};
 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(c,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(b)if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var f=new Date;f.setYear(f.getFullYear()+1);document.cookie="MODE="+c+"; expires="+f.toUTCString()}null!=this.appIcon&&(f=this.getCurrentFile(),c=null!=f?f.getMode():null,c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
@@ -8346,11 +8346,11 @@ App.prototype.showRefreshDialog=function(a,c){if(!this.showingRefreshDialog&&(th
 this.createRealtimeNotice();b.style.left="0";b.style.right="0";b.style.borderRadius="0";b.style.borderLeftStyle="none";b.style.borderRightStyle="none";b.style.marginBottom="26px";b.style.padding="8px 0 8px 0";this.dialog.container.appendChild(b)}};
 App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var c=document.createElement("div");c.className="geAlert";c.style.zIndex=2E9;c.style.left="50%";c.style.top="-100%";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(c.style,"transition","all 1s ease");c.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
 mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=c.parentNode&&(c.parentNode.removeChild(c),mxEvent.consume(a))});document.body.appendChild(c);window.setTimeout(function(){c.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(c.style,"transition","all 2s ease");c.style.opacity="0";window.setTimeout(function(){null!=c.parentNode&&c.parentNode.removeChild(c)},2E3)},15E3)}};
-App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(t){null!=document.body&&this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
+App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(p){null!=document.body&&this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
 a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):
 this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,f){f.source==b&&a(c)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(d){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var f=this.getDraft(),p=null!=f?f.data:this.getFileData(),c=Editor.useLocalStorage;
-this.createFile(this.defaultFilename,p,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=f&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
+this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(d){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var f=this.getDraft(),t=null!=f?f.data:this.getFileData(),c=Editor.useLocalStorage;
+this.createFile(this.defaultFilename,t,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=f&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
 "title"]))}),f=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);var c=4>=a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,
 null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c);this.showDialog(b.container,380,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?f(window.opener[c]):
 this.handleError(null,mxResources.get("errorLoadingFile"))}catch(h){this.handleError(h,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){f(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||
@@ -8364,26 +8364,26 @@ App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)n
 "change",mxUtils.bind(this,function(){null!=b.files&&this.openFiles(b.files)}));b.click()}else{this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var f=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?
 new StorageFile(this,b,c):new LocalFile(this,b,c))}));var h=this.dialog,k=h.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=f;k.apply(h,arguments);null==this.getCurrentFile()&&this.showSplash()})}}};
 App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var c=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=c&&c.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
+mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
 new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=b;window.openFile=null})}else{var f=document.createElement("input");
-f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=f.files)for(var a=0;a<f.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(f.files[a])}));f.click()}};
-App.prototype.saveLibrary=function(a,c,b,f,h,k,m){f=null!=f?f:this.mode;h=null!=h?h:!1;k=null!=k?k:!1;var t=this.createLibraryDataFromImages(c),p=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&f==App.MODE_DEVICE&&(b=new LocalLibrary(this,t,a));if(null==b)this.pickFolder(f,mxUtils.bind(this,function(b){f==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-t,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),p,this.drive.libraryMimeType):f==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,t,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),p,b):f==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,t,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),p,b):f==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,t,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),p,b):f==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,t,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,c)}),p,b):f==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,t,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),p)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(h||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(t);var d=mxUtils.bind(this,
-function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(b,c);null!=m&&m()}),p)});if(a!=b.getTitle()){var g=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&g!=b.getHash()&&(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(b.getHash()));this.removeLibrarySidebar(g);d()}),p)}else d()}};
-App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var f=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var h=null!=b.getTitle()?b.getTitle():this.defaultFilename,k=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,t=this.getServiceCount(!0);
-isLocalStorage&&t++;var p=4>=t?2:6<t?4:3,h=new CreateDialog(this,h,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==m&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,f)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):m!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
-this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,f,null==this.mode,c)})):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,k,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,p);this.showDialog(h.container,460,t>p?390:270,!0,!0);h.init()}else this.save(b.getTitle(),f)}};
+f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=f.files)for(var a=0;a<f.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(f.files[a])}));f.click()}};
+App.prototype.saveLibrary=function(a,c,b,f,h,k,m){f=null!=f?f:this.mode;h=null!=h?h:!1;k=null!=k?k:!1;var p=this.createLibraryDataFromImages(c),t=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&f==App.MODE_DEVICE&&(b=new LocalLibrary(this,p,a));if(null==b)this.pickFolder(f,mxUtils.bind(this,function(b){f==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+p,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),t,this.drive.libraryMimeType):f==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),t,b):f==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,p,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),t,b):f==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),t,b):f==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,c)}),t,b):f==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,p,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),t)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(h||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(p);var d=mxUtils.bind(this,
+function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(b,c);null!=m&&m()}),t)});if(a!=b.getTitle()){var g=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&g!=b.getHash()&&(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(b.getHash()));this.removeLibrarySidebar(g);d()}),t)}else d()}};
+App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var f=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var h=null!=b.getTitle()?b.getTitle():this.defaultFilename,k=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,p=this.getServiceCount(!0);
+isLocalStorage&&p++;var t=4>=p?2:6<p?4:3,h=new CreateDialog(this,h,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==m&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,f)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):m!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
+this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,f,null==this.mode,c)})):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,k,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,t);this.showDialog(h.container,460,p>t?390:270,!0,!0);h.init()}else this.save(b.getTitle(),f)}};
 App.prototype.loadTemplate=function(a,c,b){var f=a;this.isCorsEnabledForUrl(f)||(f="t="+(new Date).getTime(),f=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+f);this.loadUrl(f,mxUtils.bind(this,function(f){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(f.substring(f.indexOf(",")+1)),function(a){c(a)},b,a):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,a)?this.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
 200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a):this.isLucidChartData(f)?this.convertLucidChart(f,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){b(a)})):(/(\.png)($|\?)/i.test(a)&&(f=this.extractGraphModelFromPng(f)),c(f))}),b,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};
 App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,c,b,f,h,k,m,t){f=t?null:null!=f?f:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var p=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(a){p();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(f==App.MODE_GOOGLE&&null!=this.drive)null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
-this.drive.insertFile(a,c,m,mxUtils.bind(this,function(a){p();this.fileCreated(a,b,k,h)}),d);else if(f==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){p();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){p();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){p();this.fileCreated(a,
-b,k,h)}),d);else if(f==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){p();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_BROWSER){p();var g=mxUtils.bind(this,function(){var f=new StorageFile(this,c,a);f.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(f,b,k,h)}),d)});null==localStorage.getItem(a)?g():this.confirm(mxResources.get("replaceIt",[a]),g,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else p(),
-this.fileCreated(new LocalFile(this,c,a,null==f),b,k,h)}catch(n){p(),this.handleError(n)}}};
-App.prototype.fileCreated=function(a,c,b,f){var h=window.location.pathname;null!=c&&0<c.length&&(h+="?libs="+c);h=this.getUrl(h);a.getMode()!=App.MODE_DEVICE&&(h+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+h,t=k,p=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(p=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
-document.body.appendChild(p.container),t=this.decodeNodeIntoGraph(t,p));a.setData(this.createFileData(k,p,a,m));null!=p&&p.container.parentNode.removeChild(p.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var g=this.getCurrentFile();null==b&&null!=g&&(b=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();null!=c&&this.sidebar.showEntries(c)}),m=mxUtils.bind(this,
+App.prototype.createFile=function(a,c,b,f,h,k,m,p){f=p?null:null!=f?f:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var t=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(a){t();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(f==App.MODE_GOOGLE&&null!=this.drive)null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
+this.drive.insertFile(a,c,m,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,k,h)}),d);else if(f==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,
+b,k,h)}),d);else if(f==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_BROWSER){t();var g=mxUtils.bind(this,function(){var f=new StorageFile(this,c,a);f.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(f,b,k,h)}),d)});null==localStorage.getItem(a)?g():this.confirm(mxResources.get("replaceIt",[a]),g,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else t(),
+this.fileCreated(new LocalFile(this,c,a,null==f),b,k,h)}catch(n){t(),this.handleError(n)}}};
+App.prototype.fileCreated=function(a,c,b,f){var h=window.location.pathname;null!=c&&0<c.length&&(h+="?libs="+c);h=this.getUrl(h);a.getMode()!=App.MODE_DEVICE&&(h+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+h,p=k,t=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(t=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
+document.body.appendChild(t.container),p=this.decodeNodeIntoGraph(p,t));a.setData(this.createFileData(k,t,a,m));null!=t&&t.container.parentNode.removeChild(t.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var g=this.getCurrentFile();null==b&&null!=g&&(b=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();null!=c&&this.sidebar.showEntries(c)}),m=mxUtils.bind(this,
 function(){b||null==g||!g.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=f&&f();null==b||b?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=f&&f(),window.openWindow(h,null,m))});a.constructor==LocalFile?g():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,
 function(a){d();this.handleError(a)}))}};
 App.prototype.loadFile=function(a,c,b,f,h){this.hideDialog();var k=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var h=localStorage.getItem(a);if(null!=h)this.fileLoaded(new StorageFile(this,h,a)),null!=f&&f();else throw{message:mxResources.get("fileNotFound")};}catch(n){this.handleError(n,
@@ -8392,14 +8392,14 @@ f,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoading
 g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=d.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var a=mxUtils.bind(this,function(){this.spinner.stop();return null!=this.drive?(this.loadFile("G"+d.substring(31,d.lastIndexOf("&ex")),c,f),!0):!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(d,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 f=d,h=d.lastIndexOf("."),k=f.lastIndexOf("/");h>k&&0<k&&(f=f.substring(k+1,h),h=d.substring(h),this.useCanvasForExport||".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(c=f+h)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||g()}}),mxUtils.bind(this,function(){g()||(this.spinner.stop(),
 this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}))}else h=null,"G"==a.charAt(0)?h=this.drive:"D"==a.charAt(0)?h=this.dropbox:"W"==a.charAt(0)?h=this.oneDrive:"H"==a.charAt(0)?h=this.gitHub:"T"==a.charAt(0)&&(h=this.trello),null==h?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),
-h.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=f&&f()}),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()}))})))}),m=this.getCurrentFile(),t=mxUtils.bind(this,function(){h||null==m||!m.isModified()?k():
-this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?t():null!=m&&m.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,t):t()};
+h.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=f&&f()}),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()}))})))}),m=this.getCurrentFile(),p=mxUtils.bind(this,function(){h||null==m||!m.isModified()?k():
+this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?p():null!=m&&m.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,p):p()};
 App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?c+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?c+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+
 mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a,c){c||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(b,c){var f=0,k=[],m=mxUtils.bind(this,function(){if(0==f){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=c&&c()}});if(null!=b)for(var t=0;t<b.length;t++){var p=encodeURIComponent(decodeURIComponent(b[t]));mxUtils.bind(this,
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a,c){c||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(b,c){var f=0,k=[],m=mxUtils.bind(this,function(){if(0==f){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=c&&c()}});if(null!=b)for(var p=0;p<b.length;p++){var t=encodeURIComponent(decodeURIComponent(b[p]));mxUtils.bind(this,
 function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){f++;var d=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[c]=a;f--;m()}),g=mxUtils.bind(this,function(c){a(b,c);f--;m()});this.pendingLibraries[b]=!0;var h=b.substring(0,1);if("L"==h)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&
 null==b&&(b=this.emptyLibraryXml);null!=b?d(new StorageLibrary(this,b,a)):g()}))}catch(l){g()}}),0);else if("U"==h){var p=decodeURIComponent(b.substring(1));if(!this.isOffline()){h=p;this.isCorsEnabledForUrl(h)||(h="t="+(new Date).getTime(),h=PROXY_URL+"?url="+encodeURIComponent(p)+"&"+h);try{mxUtils.get(h,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{d(new UrlLibrary(this,a.getText(),p))}catch(l){g()}else g()}),function(){g()})}catch(y){g()}}}else{var t=null;"G"==h?
-null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{d(a)}catch(l){g()}}),function(a){g()}):g(!0)}}})(p,t)}m()});c(mxSettings.getCustomLibraries(),
+null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{d(a)}catch(l){g()}}),function(a){g()}):g(!0)}}})(t,p)}m()});c(mxSettings.getCustomLibraries(),
 function(){c((urlParams.clibs||"").split(";"))})}};
 App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();if(null!=a&&("manual"==DrawioFile.SYNC||"auto"==DrawioFile.SYNC)){var c=("manual"==DrawioFile.SYNC||null!=a.sync&&!a.sync.enabled&&"min"!=uiTheme)&&(a.constructor==DriveFile||a.constructor==OneDriveFile)||a.constructor==GitHubFile||EditorUi.isElectronApp;null==this.syncButton&&c?(this.syncButton=document.createElement("div"),this.syncButton.className="geBtn gePrimaryBtn",this.syncButton.style.display=
 "inline-block",this.syncButton.style.padding="0 10px 0 10px",this.syncButton.style.marginTop="-4px",this.syncButton.style.height="28px",this.syncButton.style.lineHeight="28px",this.syncButton.style.minWidth="0px",this.syncButton.style.cssFloat="left",this.syncButton.setAttribute("title",mxResources.get("synchronize")+" (Alt+Shift+S)"),mxUtils.write(this.syncButton,mxResources.get("synchronize")),mxEvent.addListener(this.syncButton,"click",mxUtils.bind(this,function(){this.actions.get("synchronize").funct()})),
@@ -8416,9 +8416,9 @@ b():this.confirm(mxResources.get("replaceIt",[c]),b))};
 App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var c=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,c);this.fname.setAttribute("title",c+" - "+mxResources.get("rename"))}var c=this.editor.graph,b=a.isEditable()&&!a.invalidChecksum;c.isEnabled()&&!b&&c.reset();c.setEnabled(b);null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?
 window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.format.refresh()};
 App.prototype.showAuthDialog=function(a,c,b,f){var h=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=b&&b(a,mxUtils.bind(this,function(){this.hideDialog();h()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=f&&f();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,c,b,f,h,k){var m=c;/\.svg$/i.test(m)||(m=m.substring(0,c.lastIndexOf("."))+f);var t=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(t=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",a,!0);t||(p.responseType="blob");p.onload=mxUtils.bind(this,function(){var a=null;t?(a=JSON.parse(p.responseText),a=this.base64ToBlob(a.content,
-"application/octet-stream")):a=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){h(new LocalFile(this,a,m,!0))}),k,c)});p.send()}else{var d=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?h(new LocalFile(this,temp,m,!0)):h(new LocalFile(this,b,c,!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?h(new LocalFile(this,a.responseText,m,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),c):h(new LocalFile(this,b,m,!0))}catch(n){null!=k&&k(n)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);t?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=h){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?
+App.prototype.convertFile=function(a,c,b,f,h,k){var m=c;/\.svg$/i.test(m)||(m=m.substring(0,c.lastIndexOf("."))+f);var p=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(p=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var t=new XMLHttpRequest;t.open("GET",a,!0);p||(t.responseType="blob");t.onload=mxUtils.bind(this,function(){var a=null;p?(a=JSON.parse(t.responseText),a=this.base64ToBlob(a.content,
+"application/octet-stream")):a=new Blob([t.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){h(new LocalFile(this,a,m,!0))}),k,c)});t.send()}else{var d=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?h(new LocalFile(this,temp,m,!0)):h(new LocalFile(this,b,c,!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?h(new LocalFile(this,a.responseText,m,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),c):h(new LocalFile(this,b,m,!0))}catch(n){null!=k&&k(n)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);p?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=h){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?
 "data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));d(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,d,k,b)}};
 App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
 "url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
@@ -8445,8 +8445,8 @@ else{var c=!1;this.userPanel.innerHTML="";b=document.createElement("img");b.setA
 '<table title="User ID: '+b.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b.pictureUrl?'<img width="80" height="80" style="margin-right:10px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img width="80" height="80" style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(b.displayName)+"</b><br><small>"+mxUtils.htmlEntities(b.email)+
 "</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",b=document.createElement("div"),b.style.textAlign="center",b.style.padding="12px",b.style.background="whiteSmoke",b.style.borderTop="1px solid #e0e0e0",b.style.whiteSpace="nowrap",b.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,
 mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display="none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==
-DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,f,t){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+
-"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=t?"<br><br><small>"+mxUtils.htmlEntities(t)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=f&&a.appendChild(mxUtils.button(mxResources.get("signOut"),f)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),
+DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,f,p){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+
+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=p?"<br><br><small>"+mxUtils.htmlEntities(p)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=f&&a.appendChild(mxUtils.button(mxResources.get("signOut"),f)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),
 IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var a=
 this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var b=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitHubFile){var b=
 mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=
@@ -8454,8 +8454,8 @@ mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.is
 null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,
 a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
 var c=document.createElement("img");mxUtils.setOpacity(c,50);c.style.height="16px";c.style.width="16px";c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,c){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(c))};
-var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,f=a.editor.graph,h=mxUtils.bind(f,f.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),t=("www.draw.io"==
-window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),p=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);
+var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,f=a.editor.graph,h=mxUtils.bind(f,f.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),p=("www.draw.io"==
+window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),t=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);
 mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,
 function(b,c,d,f,g,h,k,m,n,p){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,f,g,h,k,!m,n,p)}),!0,null,"svg")}));a.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){var b=new NewDialog(a,null,!1,function(b){a.hideDialog();null!=b&&(f.setSelectionCells(a.importXml(b)),f.scrollCellToVisible(f.getSelectionCell()))},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));a.showDialog(b.container,620,440,!0,!0)}));a.actions.put("exportXml",
 new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var g=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),h=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);h.style.marginBottom="16px";
@@ -8490,12 +8490,12 @@ mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.INCHES);a.hRuler
 function(){a.vRuler.setUnit(mxRuler.prototype.PIXELS);a.hRuler.setUnit(mxRuler.prototype.PIXELS);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c))})));"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),mxResources.parse("testChecksum=Checksum"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),
 mxResources.parse("testShowConsole=Show Console"),mxResources.parse("testXmlImageExport=XML Image Export"),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),a.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){f.isSelectionEmpty()||a.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+f.compress(mxUtils.getXml(f.encodeCells(f.getSelectionCells())))+"', width, height, 'Title');")})),a.actions.addAction("showBoundingBox",
 mxUtils.bind(this,function(){var a=f.getGraphBounds(),b=f.view.translate,c=f.view.scale;f.insertVertex(f.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),a.actions.addAction("testChecksum",mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.length)try{var c=a.getPagesForNode(mxUtils.parseXml(b).documentElement,
-"mxGraphModel"),d=a.getHashValueForPages(c);console.log("checksum",c,d)}catch(B){a.handleError(B),console.error(B)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(A){a.handleError(A),
-console.error(A)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,f.getModel())})),a.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=f.getGraphBounds(),c=f.view.scale,d=mxUtils.createXmlDocument(),g=d.createElement("output");d.appendChild(g);d=new mxXmlCanvas2D(g);d.translate(Math.floor((1-
+"mxGraphModel"),d=a.getHashValueForPages(c);console.log("checksum",c,d)}catch(C){a.handleError(C),console.error(C)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(z){a.handleError(z),
+console.error(z)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,f.getModel())})),a.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=f.getGraphBounds(),c=f.view.scale,d=mxUtils.createXmlDocument(),g=d.createElement("output");d.appendChild(g);d=new mxXmlCanvas2D(g);d.translate(Math.floor((1-
 b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var h=0,k=d.save;d.save=function(){h++;k.apply(this,arguments)};var m=d.restore;d.restore=function(){h--;m.apply(this,arguments)};var n=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,h);n.apply(this,arguments);mxLog.debug("leaving shape",a,h)};a.drawState(f.getView().getState(f.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",h)})),a.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==
 a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization",
 "Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testChecksum testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),
-c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(z){a.handleError(z,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);
+c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(A){a.handleError(A,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);
 this.addMenuItems(b,["-","testShowConsole"],c)}))));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(f.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);
 b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,f,g,h,l,k,m,n){a.createHtml(b,c,d,f,g,h,l,k,m,n,
 mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!f){var g=a.document.createElement("div");
@@ -8513,8 +8513,8 @@ d.xml=c;b&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMe
 mxResources.get("loading"))&&b.getFile(c,function(b){var c=h(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");g(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var g=mxUtils.bind(this,function(b,c,d){var g=f.view,h=f.getGraphBounds(),l=f.snap(Math.ceil(Math.max(0,h.x/g.scale-g.translate.x)+4*f.gridSize)),k=f.snap(Math.ceil(Math.max(0,
 (h.y+h.height)/g.scale-g.translate.y)+4*f.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(g){var h=!0,m=mxUtils.bind(this,function(){a.resizeImage(g,b,mxUtils.bind(this,function(g,m,n){g=h?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/n)):1;a.importFile(b,c,l,k,Math.round(m*g),Math.round(n*g),d,function(b){a.spinner.stop();f.setSelectionCells(b);f.scrollCellToVisible(f.getSelectionCell())})}),h)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){h=
 a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,l,k,0,0,d,function(b){a.spinner.stop();f.setSelectionCells(b);f.scrollCellToVisible(f.getSelectionCell())})}),h=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+
-"...",null,function(){d(a.drive)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){d(a.oneDrive)},c):t&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){d(a.dropbox)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){d(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){d(a.trello)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+
+"...",null,function(){d(a.drive)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){d(a.oneDrive)},c):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){d(a.dropbox)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){d(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){d(a.trello)},c):t&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+
 "...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){g(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==
 c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=h;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(c);f=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");
 mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(f,
@@ -8531,16 +8531,16 @@ null,null,Editor.ctrlKey+"+Shift+X").isEnabled=h;a.actions.put("insertRectangle"
 new Action(mxResources.get("rhombus"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&w("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=h;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(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&
 !a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);y(b,c,["fromText","plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("openRecent",new Menu(function(b,c){var d=
 a.getRecent();if(null!=d){for(var f=0;f<d.length;f++)(function(d){var f=d.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(d.title+" ("+mxResources.get(f)+")",null,function(){a.loadFile(d.id)},c)})(d[f]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):t&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
-null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
+null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):t&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+
 "...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,
 80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},c):t&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,
-null,App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,
-null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):t&&b.addItem(mxResources.get("oneDrive")+
+null,null,null,App.MODE_ONEDRIVE)},c):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,
+null,App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):t&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,
+null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):p&&b.addItem(mxResources.get("oneDrive")+
 " ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},
-c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=
-b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(G){a.handleError(G,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},
+c):t&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=
+b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(H){a.handleError(H,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},
 mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline",
 "layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
 c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);
@@ -8587,9 +8587,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d
 EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="12px";c.style.marginLeft="30px";for(var b=this.editor.isChromelessView()?29:59,f=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
 b)/this.pages.length)+1),h=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,f){this.pages[b]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",f.style.fontWeight="bold",f.style.borderTopStyle="none"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),h=b):mxEvent.consume(c)}));mxEvent.addListener(f,
 "dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){null!=h&&b!=h&&this.movePage(h,b);a.stopPropagation();a.preventDefault()}));c.appendChild(f)})(k,this.createTabForPage(this.pages[k],f,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);
-f=this.createPageMenuTab();this.tabContainer.appendChild(f);f=null;this.isPageInsertTabVisible()&&(f=this.createPageInsertTab(),this.tabContainer.appendChild(f));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=f&&(f.style.position="absolute",f.style.right="0px",c.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var t=this.createControlTab(4,
-"&nbsp;&#10095;");t.style.position="absolute";t.style.right=this.editor.chromeless?"0px":"29px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var p=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=p+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,p-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(t,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,
-0<c.scrollLeft?100:50);mxUtils.setOpacity(t,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(t,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,p-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(t,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+f=this.createPageMenuTab();this.tabContainer.appendChild(f);f=null;this.isPageInsertTabVisible()&&(f=this.createPageInsertTab(),this.tabContainer.appendChild(f));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=f&&(f.style.position="absolute",f.style.right="0px",c.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var p=this.createControlTab(4,
+"&nbsp;&#10095;");p.style.position="absolute";p.style.right=this.editor.chromeless?"0px":"29px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=t+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(p,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,
+0<c.scrollLeft?100:50);mxUtils.setOpacity(p,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(p,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
 EditorUi.prototype.createTab=function(a){var c=document.createElement("div");c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.whiteSpace="nowrap";c.style.boxSizing="border-box";c.style.position="relative";c.style.overflow="hidden";c.style.marginLeft="-1px";c.style.height=this.tabContainer.clientHeight+"px";c.style.padding="8px 4px 8px 4px";c.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";c.style.borderBottomStyle="solid";c.style.backgroundColor=this.tabContainer.style.backgroundColor;
 c.style.cursor="move";c.style.color="gray";a&&(mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(c.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){c.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return c};
 EditorUi.prototype.createControlTab=function(a,c){var b=this.createTab(!0);b.style.paddingTop=a+"px";b.style.cursor="pointer";b.style.width="30px";b.style.lineHeight="30px";b.innerHTML=c;null!=b.firstChild&&null!=b.firstChild.style&&mxUtils.setOpacity(b.firstChild,40);return b};
@@ -8599,40 +8599,40 @@ null,mxUtils.bind(this,function(){this.renamePage(f,f.getName())}),b),a.addSepar
 mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
 EditorUi.prototype.createTabForPage=function(a,c,b){b=this.createTab(b);var f=a.getName()||mxResources.get("untitled"),h=a.getId();b.setAttribute("title",f+(null!=h?" ("+h+")":""));mxUtils.write(b,f);b.style.maxWidth=c+"px";b.style.width=c+"px";this.addTabListeners(a,b);42<c&&(b.style.textOverflow="ellipsis");return b};
 EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var b=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var f=!1,h=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){f=null!=this.currentMenu;h=a==this.currentPage;b.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(b.isEnabled()&&!b.isMouseDown&&(mxEvent.isTouchEvent(k)&&h||mxEvent.isPopupTrigger(k))){b.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!f){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var t=mxEvent.getClientX(k),p=mxEvent.getClientY(k);m.popup(t,p,null,k);this.setCurrentMenu(m,c)}mxEvent.consume(k)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!f){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var p=mxEvent.getClientX(k),t=mxEvent.getClientY(k);m.popup(p,t,null,k);this.setCurrentMenu(m,c)}mxEvent.consume(k)}}))};
 EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(b,f){b.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),f);b.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),f);b.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),f);b.addSeparator(f);b.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
 mxResources.get("copyOf",[a.getName()]))}),f)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,b,f){f.ui=a.ui;return b};a.afterDecode=function(a,b,f){a=f.oldIndex;f.oldIndex=f.newIndex;f.newIndex=a;return f};mxCodecRegistry.register(a)})();
 (function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,b,f){f.ui=a.ui;return b};a.afterDecode=function(a,b,f){a=f.previous;f.previous=f.name;f.name=a;return f};mxCodecRegistry.register(a)})();
 (function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,f,h){h.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(h.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&h.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(c,
 a)?b:void 0})),null!=f.relatedPage.root&&a.encodeCell(f.relatedPage.root,h));return h};a.beforeDecode=function(a,c,h){h.ui=a.ui;h.relatedPage=h.ui.getPageById(c.getAttribute("relatedPage"));if(null==h.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));h.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(h.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState"));
 c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(h.relatedPage.root=a.decodeCell(b,!1),h=b.nextSibling,b.parentNode.removeChild(b),b=h;null!=b;){h=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var f=b.getAttribute("id");null==a.lookup(f)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=h}}return c};a.afterDecode=function(a,c,h){h.index=h.previousIndex;return h};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,f,t,p){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=f.slice(),g=[],h=0;h<f.length;h++){var k=this.view.getState(f[h]),m=null!=k?k.style:this.getCellStyle(f[h]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(f[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=f[h]&&g.push(a);return a==f[h]||!this.model.isCollapsed(a)})),
+"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,f,p,t){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=f.slice(),g=[],h=0;h<f.length;h++){var k=this.view.getState(f[h]),m=null!=k?k.style:this.getCellStyle(f[h]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(f[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=f[h]&&g.push(a);return a==f[h]||!this.model.isCollapsed(a)})),
 this.model.setCollapsed(f[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);f=d;f=c.apply(this,arguments)}finally{this.model.endUpdate()}return f};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=v.view.getState(a),v.view.getState(a),b="tree"==(null!=
-b?b.style:v.getCellStyle(a)).containerType);return b}function f(a){var b=!1;null!=a&&(a=w.getParent(a),b=v.view.getState(a),v.view.getState(a),b=null!=(null!=b?b.style:v.getCellStyle(a)).childLayout);return b}function t(a){a=v.view.getState(a);if(null!=a){var b=v.getIncomingEdges(a.cell);if(0<b.length&&(b=v.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
-a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function p(a,b){b=null!=b?b:!0;v.model.beginUpdate();try{var c=v.model.getParent(a),d=v.getIncomingEdges(a),f=v.cloneCells([d[0],a]);v.model.setTerminal(f[0],v.model.getTerminal(d[0],!0),!0);var g=t(a),h=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;v.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=v.view.getState(a),l=v.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var n=v.getOutgoingEdges(v.model.getTerminal(d[0],!0));if(null!=n){for(var p=g==mxConstants.DIRECTION_SOUTH||
-g==mxConstants.DIRECTION_NORTH,q=h=d=0;q<n.length;q++){var u=v.model.getTerminal(n[q],!1);if(g==t(u)){var w=v.view.getState(u);u!=a&&null!=w&&(p&&b!=w.getCenterX()<k.getCenterX()||!p&&b!=w.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,w)&&(d=10+Math.max(d,(Math.min(m.x+m.width,w.x+w.width)-Math.max(m.x,w.x))/l),h=10+Math.max(h,(Math.min(m.y+m.height,w.y+w.height)-Math.max(m.y,w.y))/l))}}p?h=0:d=0;for(q=0;q<n.length;q++)if(u=v.model.getTerminal(n[q],!1),g==t(u)&&(w=v.view.getState(u),u!=a&&null!=
-w&&(p&&b!=w.getCenterX()<k.getCenterX()||!p&&b!=w.getCenterY()<k.getCenterY()))){var x=[];v.traverse(w.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});v.moveCells(x,(b?1:-1)*d,(b?1:-1)*h)}}}return v.addCells(f,c)}finally{v.model.endUpdate()}}function d(a){v.model.beginUpdate();try{var b=t(a),c=v.getIncomingEdges(a),d=v.cloneCells([c[0],a]);v.model.setTerminal(c[0],d[1],!1);v.model.setTerminal(d[0],d[1],!0);v.model.setTerminal(d[0],a,!1);var f=v.model.getParent(a),g=f.geometry,h=[];v.view.currentRoot!=
+b?b.style:v.getCellStyle(a)).containerType);return b}function f(a){var b=!1;null!=a&&(a=w.getParent(a),b=v.view.getState(a),v.view.getState(a),b=null!=(null!=b?b.style:v.getCellStyle(a)).childLayout);return b}function p(a){a=v.view.getState(a);if(null!=a){var b=v.getIncomingEdges(a.cell);if(0<b.length&&(b=v.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 t(a,b){b=null!=b?b:!0;v.model.beginUpdate();try{var c=v.model.getParent(a),d=v.getIncomingEdges(a),f=v.cloneCells([d[0],a]);v.model.setTerminal(f[0],v.model.getTerminal(d[0],!0),!0);var g=p(a),h=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;v.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=v.view.getState(a),l=v.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var n=v.getOutgoingEdges(v.model.getTerminal(d[0],!0));if(null!=n){for(var t=g==mxConstants.DIRECTION_SOUTH||
+g==mxConstants.DIRECTION_NORTH,q=h=d=0;q<n.length;q++){var u=v.model.getTerminal(n[q],!1);if(g==p(u)){var w=v.view.getState(u);u!=a&&null!=w&&(t&&b!=w.getCenterX()<k.getCenterX()||!t&&b!=w.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,w)&&(d=10+Math.max(d,(Math.min(m.x+m.width,w.x+w.width)-Math.max(m.x,w.x))/l),h=10+Math.max(h,(Math.min(m.y+m.height,w.y+w.height)-Math.max(m.y,w.y))/l))}}t?h=0:d=0;for(q=0;q<n.length;q++)if(u=v.model.getTerminal(n[q],!1),g==p(u)&&(w=v.view.getState(u),u!=a&&null!=
+w&&(t&&b!=w.getCenterX()<k.getCenterX()||!t&&b!=w.getCenterY()<k.getCenterY()))){var x=[];v.traverse(w.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});v.moveCells(x,(b?1:-1)*d,(b?1:-1)*h)}}}return v.addCells(f,c)}finally{v.model.endUpdate()}}function d(a){v.model.beginUpdate();try{var b=p(a),c=v.getIncomingEdges(a),d=v.cloneCells([c[0],a]);v.model.setTerminal(c[0],d[1],!1);v.model.setTerminal(d[0],d[1],!0);v.model.setTerminal(d[0],a,!1);var f=v.model.getParent(a),g=f.geometry,h=[];v.view.currentRoot!=
 f&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);v.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);v.moveCells(h,k,l);return v.addCells(d,f)}finally{v.model.endUpdate()}}function g(a){v.model.beginUpdate();try{var b=v.model.getParent(a),c=v.getIncomingEdges(a),d=v.cloneCells([c[0],
-a]);v.model.setTerminal(d[0],a,!0);var c=v.getOutgoingEdges(a),f=b.geometry,g=[];v.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=v.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=v.view.getBounds(g),m=t(a),n=v.view.translate,p=v.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-n.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
-null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-n.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/p-n.y+-f.y+10);return v.addCells(d,b)}finally{v.model.endUpdate()}}function n(a,b,c){a=v.getOutgoingEdges(a);c=v.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=v.view.getState(v.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}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 q(a,b){var c=t(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():
+a]);v.model.setTerminal(d[0],a,!0);var c=v.getOutgoingEdges(a),f=b.geometry,g=[];v.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=v.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=v.view.getBounds(g),m=p(a),n=v.view.translate,t=v.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-n.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-n.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/t-n.y+-f.y+10);return v.addCells(d,b)}finally{v.model.endUpdate()}}function n(a,b,c){a=v.getOutgoingEdges(a);c=v.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=v.view.getState(v.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}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 q(a,b){var c=p(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():
 c==b?(d=v.getOutgoingEdges(a),null!=d&&0<d.length&&v.setSelectionCell(v.model.getTerminal(d[0],!1))):(c=v.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(v.model.getTerminal(c[0],!0),d,a),c=v.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&v.setSelectionCell(d[c].cell)))))}var u=this,v=u.editor.graph,w=v.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
 mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=u.menus.createPopupMenu;u.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==v.getSelectionCount()){c=v.getSelectionCell();var f=v.getOutgoingEdges(c);a.addSeparator();null!=f&&0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(v.getSelectionCell())&&(a.addSeparator(),0<v.getIncomingEdges(c).length&&
 this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=v.getSelectionCell(),a=v.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(v.model.getTerminal(a[c],!1));v.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=v.getSelectionCell(),a=v.getIncomingEdges(a);if(null!=a&&0<a.length&&
 (a=v.getOutgoingEdges(v.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(v.model.getTerminal(a[c],!1));v.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=v.getSelectionCell(),a=v.getIncomingEdges(a);null!=a&&0<a.length&&v.setSelectionCell(v.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=
 v.getSelectionCell(),b=[];v.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});v.setSelectionCells(b)}},null,null,"Alt+Shift+D");var l=v.removeCells;v.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var f=[],g=0;g<a.length;g++){var h=a[g];w.isEdge(h)&&c(h)&&(f.push(h),h=w.getTerminal(h,!1));b(h)?(v.traverse(h,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0}),h=v.getIncomingEdges(a[g]),
 a=a.concat(h)):f.push(a[g])}a=f;return l.apply(this,arguments)};u.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var x=v.duplicateCells;v.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),f=0;f<d.length;f++){var g=v.view.getState(d[f]);if(null!=g&&b(g.cell))for(var h=v.getIncomingEdges(g.cell),g=0;g<h.length;g++)mxUtils.remove(h[g],a)}this.model.beginUpdate();try{var k=x.call(this,a,c);if(k.length==
-a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=v.getIncomingEdges(k[f]),h=v.getIncomingEdges(a[f]);if(0==l.length&&0<h.length){var m=this.cloneCell(h[0]);this.addEdge(m,v.getDefaultParent(),this.model.getTerminal(h[0],!0),k[f])}}}finally{this.model.endUpdate()}return k};var A=v.moveCells;v.moveCells=function(a,c,d,f,g,h,k){var l=null;this.model.beginUpdate();try{var m=g,n=this.view.getState(g),p=null!=n?n.style:this.getCellStyle(g);if(null!=a&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=
-0;t<a.length;t++)if(b(a[t])||v.model.isEdge(a[t])&&null==v.model.getTerminal(a[t],!0)){g=v.model.getParent(a[t]);break}if(null!=m&&g!=m&&null!=this.view.getState(a[0])){var q=v.getIncomingEdges(a[0]);if(0<q.length){var u=v.view.getState(v.model.getTerminal(q[0],!0));if(null!=u){var w=v.view.getState(m);null!=w&&(c=(w.getCenterX()-u.getCenterX())/v.view.scale,d=(w.getCenterY()-u.getCenterY())/v.view.scale)}}}}l=A.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&
+a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=v.getIncomingEdges(k[f]),h=v.getIncomingEdges(a[f]);if(0==l.length&&0<h.length){var m=this.cloneCell(h[0]);this.addEdge(m,v.getDefaultParent(),this.model.getTerminal(h[0],!0),k[f])}}}finally{this.model.endUpdate()}return k};var z=v.moveCells;v.moveCells=function(a,c,d,f,g,h,k){var l=null;this.model.beginUpdate();try{var m=g,n=this.view.getState(g),p=null!=n?n.style:this.getCellStyle(g);if(null!=a&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=
+0;t<a.length;t++)if(b(a[t])||v.model.isEdge(a[t])&&null==v.model.getTerminal(a[t],!0)){g=v.model.getParent(a[t]);break}if(null!=m&&g!=m&&null!=this.view.getState(a[0])){var q=v.getIncomingEdges(a[0]);if(0<q.length){var u=v.view.getState(v.model.getTerminal(q[0],!0));if(null!=u){var w=v.view.getState(m);null!=w&&(c=(w.getCenterX()-u.getCenterX())/v.view.scale,d=(w.getCenterY()-u.getCenterY())/v.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&
 0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t],m,!0);else if(b(a[t])&&(q=v.getIncomingEdges(a[t]),0<q.length))if(!f)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==v.getIncomingEdges(l[t]).length){n=m;if(null==n||n==v.model.getParent(a[t]))n=v.model.getTerminal(q[0],!0);f=this.cloneCell(q[0]);this.addEdge(f,v.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var E=u.sidebar.dropAndConnect;
-u.sidebar.dropAndConnect=function(a,c,d,f){var g=v.model,h=null;g.beginUpdate();try{if(h=E.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=v.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var B={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},z=
-u.onKeyDown;u.onKeyDown=function(a){try{if(v.isEnabled()&&!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var c=null;0<v.getIncomingEdges(v.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(v.getSelectionCell()):g(v.getSelectionCell()):13==a.which&&(c=p(v.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&v.model.isEdge(c[0])?v.setSelectionCell(v.model.getTerminal(c[0],!1)):v.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
-v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=B[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(N){console.log("error",N)}mxEvent.isConsumed(a)||z.apply(this,arguments)};var G=v.connectVertex;v.connectVertex=function(a,c,f,h,k,l){var m=v.getIncomingEdges(a);return b(a)&&0<m.length?(f=t(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,f==c?g(a):h==k?d(a):p(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,f,h,k,l)};v.getSubtree=function(a){var c=[a];b(a)&&
+u.sidebar.dropAndConnect=function(a,c,d,f){var g=v.model,h=null;g.beginUpdate();try{if(h=E.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=v.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var C={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},A=
+u.onKeyDown;u.onKeyDown=function(a){try{if(v.isEnabled()&&!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var c=null;0<v.getIncomingEdges(v.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(v.getSelectionCell()):g(v.getSelectionCell()):13==a.which&&(c=t(v.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&v.model.isEdge(c[0])?v.setSelectionCell(v.model.getTerminal(c[0],!1)):v.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=C[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(a))}}catch(N){console.log("error",N)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var H=v.connectVertex;v.connectVertex=function(a,c,f,h,k,l){var m=v.getIncomingEdges(a);return b(a)&&0<m.length?(f=p(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,f==c?g(a):h==k?d(a):t(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,f,h,k,l)};v.getSubtree=function(a){var c=[a];b(a)&&
 !f(a)&&v.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
 "18px",this.moveHandle.style.height="18px",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.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.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 I=mxVertexHandler.prototype.destroy;
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.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 I=mxVertexHandler.prototype.destroy;
 mxVertexHandler.prototype.destroy=function(a,b){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=f.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
 a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap 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;container=1;recursiveResize=0;treeFolding=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;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
@@ -8660,8 +8660,8 @@ Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,
 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="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
 "#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;
 HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var k=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
-"30px");k.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var t=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):t.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=
-function(){p.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
+"30px");k.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):p.apply(this,arguments)};var t=App.prototype.updateUserElement;App.prototype.updateUserElement=
+function(){t.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
 var d=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){d.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
 "24px";a.style.width="24px"}null!=this.syncButton&&(a=this.syncButton,a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;",a.className="geToolbarButton",a.innerHTML="",a.style.backgroundImage="url("+Editor.syncImage+")",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="24px 24px",a.style.height="24px",a.style.width="24px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=
 document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,
@@ -8699,21 +8699,21 @@ null,640<=b?c("",g.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)"
 null],60)}f=h.menus.get("language");null!=f&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&540<=b?(null==N&&(g=p.addMenu("",f.funct),g.setAttribute("title",mxResources.get("language")),g.className="geToolbarButton",g.style.backgroundImage="url("+Editor.globeImage+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.position="absolute",g.style.height="24px",g.style.width="24px",g.style.zIndex="1",g.style.top="11px",g.style.right=
 "14px",g.style.cursor="pointer",m.appendChild(g),N=g),h.buttonContainer.style.right="40px"):h.buttonContainer.style.right="14px"}v.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);var h=this,k=h.editor.graph;h.toolbar=this.createToolbar(h.createDiv("geToolbar"));h.defaultLibraryName=
 mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(h,m);h.statusContainer=h.createStatusContainer();h.statusContainer.style.position="relative";h.statusContainer.style.maxWidth="";h.statusContainer.style.marginTop="7px";h.statusContainer.style.marginLeft="6px";h.statusContainer.style.color=
-"gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var q=h.descriptorChanged;h.descriptorChanged=function(){q.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};
+"gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var t=h.descriptorChanged;h.descriptorChanged=function(){t.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};
 h.setStatusText(h.editor.getStatus());m.appendChild(h.statusContainer);h.buttonContainer=document.createElement("div");h.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";m.appendChild(h.buttonContainer);h.menubarContainer=h.buttonContainer;h.tabContainer=document.createElement("div");h.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 g=h.diagramContainer.parentNode,t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";h.diagramContainer.style.top="47px";var u=h.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var F=p.addMenu("100%",u.funct);F.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");F.style.whiteSpace="nowrap";F.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";F.style.backgroundPosition="right 6px center";
-F.style.backgroundRepeat="no-repeat";F.style.backgroundColor="#ffffff";F.style.paddingRight="10px";F.style.display="block";F.style.position="absolute";F.style.textDecoration="none";F.style.textDecoration="none";F.style.right="0px";F.style.bottom="0px";F.style.overflow="hidden";F.style.visibility="hidden";F.style.textAlign="center";F.style.color="#000";F.style.fontSize="12px";F.style.color="#707070";F.style.width="59px";F.style.borderTop="1px solid lightgray";F.style.borderLeft="1px solid lightgray";
-F.style.height=parseInt(h.tabContainer.style.height)-1+"px";F.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";t.appendChild(F);u=mxUtils.bind(this,function(){F.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);h.editor.addListener("resetGraphView",u);h.editor.addListener("pageSelected",u);var J=h.setGraphEnabled;h.setGraphEnabled=function(){J.apply(this,arguments);null!=this.tabContainer&&(F.style.visibility=this.tabContainer.style.visibility,
-this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}t.appendChild(h.tabContainer);t.appendChild(m);t.appendChild(h.diagramContainer);g.appendChild(t);h.updateTabContainer();var N=null;f();mxEvent.addListener(window,"resize",function(){f();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
+var g=h.diagramContainer.parentNode,q=document.createElement("div");q.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";h.diagramContainer.style.top="47px";var u=h.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var G=p.addMenu("100%",u.funct);G.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");G.style.whiteSpace="nowrap";G.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";G.style.backgroundPosition="right 6px center";
+G.style.backgroundRepeat="no-repeat";G.style.backgroundColor="#ffffff";G.style.paddingRight="10px";G.style.display="block";G.style.position="absolute";G.style.textDecoration="none";G.style.textDecoration="none";G.style.right="0px";G.style.bottom="0px";G.style.overflow="hidden";G.style.visibility="hidden";G.style.textAlign="center";G.style.color="#000";G.style.fontSize="12px";G.style.color="#707070";G.style.width="59px";G.style.borderTop="1px solid lightgray";G.style.borderLeft="1px solid lightgray";
+G.style.height=parseInt(h.tabContainer.style.height)-1+"px";G.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";q.appendChild(G);u=mxUtils.bind(this,function(){G.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);h.editor.addListener("resetGraphView",u);h.editor.addListener("pageSelected",u);var J=h.setGraphEnabled;h.setGraphEnabled=function(){J.apply(this,arguments);null!=this.tabContainer&&(G.style.visibility=this.tabContainer.style.visibility,
+this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}q.appendChild(h.tabContainer);q.appendChild(m);q.appendChild(h.diagramContainer);g.appendChild(q);h.updateTabContainer();var N=null;f();mxEvent.addListener(window,"resize",function(){f();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
 null!=h.menus.tagsWindow&&h.menus.tagsWindow.window.fit();null!=h.menus.findWindow&&h.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,k,m){var f=c.y,h=c.x,d=!1,g=!1;if(null!=this.states&&null!=b&&null!=c){var n=this,q=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);q.x=b.x+h;q.y=b.y+f;q.width=b.width;q.height=b.height;for(var w=[],y=[],l=0;l<this.states.length;l++){var x=this.states[l];x instanceof mxCellState&&(m||!this.graph.isCellSelected(x.cell))&&((q.x>=x.x&&q.x<=x.x+x.width||x.x>=q.x&&x.x<=q.x+q.width)&&(q.y>
-x.y+x.height+4||q.y+q.height+4<x.y)?w.push(x):(q.y>=x.y&&q.y<=x.y+x.height||x.y>=q.y&&x.y<=q.y+q.height)&&(q.x>x.x+x.width+4||q.x+q.width+4<x.x)&&y.push(x))}var A=0,E=0,B=x=0,z=0,G=0,D=0,H=0,I=5*u;if(1<w.length){w.push(q);w.sort(function(a,b){return a.y-b.y});var C=!1,l=q==w[0],u=q==w[w.length-1];if(!l&&!u)for(l=1;l<w.length-1;l++)if(q==w[l]){u=w[l-1];l=w[l+1];x=E=B=(l.y-u.y-u.height-q.height)/2;break}for(l=0;l<w.length-1;l++){var u=w[l],F=w[l+1],J=q==u||q==F,F=F.y-u.y-u.height,C=C|q==u;if(0==E&&
-0==A)E=F,A=1;else if(Math.abs(E-F)<=(J||1==l&&C?v:0))A+=1;else if(1<A&&C){w=w.slice(0,l+1);break}else if(3<=w.length-l&&!C)A=0,x=E=0!=B?B:0,w.splice(0,0==l?1:l),l=-1;else break;0!=x||J||(E=x=F)}3==w.length&&w[1]==q&&(x=0)}if(1<y.length){y.push(q);y.sort(function(a,b){return a.x-b.x});C=!1;l=q==y[0];u=q==y[y.length-1];if(!l&&!u)for(l=1;l<y.length-1;l++)if(q==y[l]){u=y[l-1];l=y[l+1];D=G=H=(l.x-u.x-u.width-q.width)/2;break}for(l=0;l<y.length-1;l++){u=y[l];F=y[l+1];J=q==u||q==F;F=F.x-u.x-u.width;C|=q==
-u;if(0==G&&0==z)G=F,z=1;else if(Math.abs(G-F)<=(J||1==l&&C?v:0))z+=1;else if(1<z&&C){y=y.slice(0,l+1);break}else if(3<=y.length-l&&!C)z=0,D=G=0!=H?H:0,y.splice(0,0==l?1:l),l=-1;else break;0!=D||J||(G=D=F)}3==y.length&&y[1]==q&&(D=0)}v=function(a,b,c,d){var f=[],g;d?(d=I,g=0):(d=0,g=I);f.push(new mxPoint(a.x-d,a.y-g));f.push(new mxPoint(a.x+d,a.y+g));f.push(a);f.push(b);f.push(new mxPoint(b.x-d,b.y-g));f.push(new mxPoint(b.x+d,b.y+g));if(null!=c)return c.points=f,c;a=new mxPolyline(f,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(n.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=n.guidesArrHor)for(var c=0;c<n.guidesArrHor.length;c++)n.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=n.guidesArrVer)for(c=0;c<n.guidesArrVer.length;c++)n.guidesArrVer[c].node.style.visibility="hidden"};if(1<z&&z==y.length-1){z=[];H=n.guidesArrHor;d=[];h=0;l=y[0]==q?1:0;C=y[l].y+y[l].height;if(0<D)for(l=0;l<y.length-1;l++)u=
-y[l],F=y[l+1],q==u?(h=F.x-u.width-D,d.push(new mxPoint(h+u.width+I,C)),d.push(new mxPoint(F.x-I,C))):q==F?(d.push(new mxPoint(u.x+u.width+I,C)),h=u.x+u.width+D,d.push(new mxPoint(h-I,C))):(d.push(new mxPoint(u.x+u.width+I,C)),d.push(new mxPoint(F.x-I,C)));else u=y[0],l=y[2],h=u.x+u.width+(l.x-u.x-u.width-q.width)/2,d.push(new mxPoint(u.x+u.width+I,C)),d.push(new mxPoint(h-I,C)),d.push(new mxPoint(h+q.width+I,C)),d.push(new mxPoint(l.x-I,C));for(l=0;l<d.length;l+=2)y=d[l],D=d[l+1],y=v(y,D,null!=H?
-H[l/2]:null),y.node.style.visibility="visible",y.redraw(),z.push(y);for(l=d.length/2;null!=H&&l<H.length;l++)H[l].destroy();n.guidesArrHor=z;h-=b.x;d=!0}else G(!0);if(1<A&&A==w.length-1){z=[];H=n.guidesArrVer;g=[];f=0;l=w[0]==q?1:0;A=w[l].x+w[l].width;if(0<x)for(l=0;l<w.length-1;l++)u=w[l],F=w[l+1],q==u?(f=F.y-u.height-x,g.push(new mxPoint(A,f+u.height+I)),g.push(new mxPoint(A,F.y-I))):q==F?(g.push(new mxPoint(A,u.y+u.height+I)),f=u.y+u.height+x,g.push(new mxPoint(A,f-I))):(g.push(new mxPoint(A,u.y+
-u.height+I)),g.push(new mxPoint(A,F.y-I)));else u=w[0],l=w[2],f=u.y+u.height+(l.y-u.y-u.height-q.height)/2,g.push(new mxPoint(A,u.y+u.height+I)),g.push(new mxPoint(A,f-I)),g.push(new mxPoint(A,f+q.height+I)),g.push(new mxPoint(A,l.y-I));for(l=0;l<g.length;l+=2)y=g[l],D=g[l+1],y=v(y,D,null!=H?H[l/2]:null,!0),y.node.style.visibility="visible",y.redraw(),z.push(y);for(l=g.length/2;null!=H&&l<H.length;l++)H[l].destroy();n.guidesArrVer=z;f-=b.y;g=!0}else G(!1,!0)}if(d||g)return q=new mxPoint(h,f),w=a.call(this,
-b,q,k,m),d&&!g?q.y=w.y:g&&!d&&(q.x=w.x),w.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),w.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;G(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,f=this.guidesArrHor;if(null!=b)for(var m=0;m<b.length;m++)b[m].node.style.visibility=a?"visible":"hidden";if(null!=
+x.y+x.height+4||q.y+q.height+4<x.y)?w.push(x):(q.y>=x.y&&q.y<=x.y+x.height||x.y>=q.y&&x.y<=q.y+q.height)&&(q.x>x.x+x.width+4||q.x+q.width+4<x.x)&&y.push(x))}var z=0,E=0,C=x=0,A=0,H=0,D=0,F=0,I=5*u;if(1<w.length){w.push(q);w.sort(function(a,b){return a.y-b.y});var B=!1,l=q==w[0],u=q==w[w.length-1];if(!l&&!u)for(l=1;l<w.length-1;l++)if(q==w[l]){u=w[l-1];l=w[l+1];x=E=C=(l.y-u.y-u.height-q.height)/2;break}for(l=0;l<w.length-1;l++){var u=w[l],G=w[l+1],J=q==u||q==G,G=G.y-u.y-u.height,B=B|q==u;if(0==E&&
+0==z)E=G,z=1;else if(Math.abs(E-G)<=(J||1==l&&B?v:0))z+=1;else if(1<z&&B){w=w.slice(0,l+1);break}else if(3<=w.length-l&&!B)z=0,x=E=0!=C?C:0,w.splice(0,0==l?1:l),l=-1;else break;0!=x||J||(E=x=G)}3==w.length&&w[1]==q&&(x=0)}if(1<y.length){y.push(q);y.sort(function(a,b){return a.x-b.x});B=!1;l=q==y[0];u=q==y[y.length-1];if(!l&&!u)for(l=1;l<y.length-1;l++)if(q==y[l]){u=y[l-1];l=y[l+1];D=H=F=(l.x-u.x-u.width-q.width)/2;break}for(l=0;l<y.length-1;l++){u=y[l];G=y[l+1];J=q==u||q==G;G=G.x-u.x-u.width;B|=q==
+u;if(0==H&&0==A)H=G,A=1;else if(Math.abs(H-G)<=(J||1==l&&B?v:0))A+=1;else if(1<A&&B){y=y.slice(0,l+1);break}else if(3<=y.length-l&&!B)A=0,D=H=0!=F?F:0,y.splice(0,0==l?1:l),l=-1;else break;0!=D||J||(H=D=G)}3==y.length&&y[1]==q&&(D=0)}v=function(a,b,c,d){var f=[],g;d?(d=I,g=0):(d=0,g=I);f.push(new mxPoint(a.x-d,a.y-g));f.push(new mxPoint(a.x+d,a.y+g));f.push(a);f.push(b);f.push(new mxPoint(b.x-d,b.y-g));f.push(new mxPoint(b.x+d,b.y+g));if(null!=c)return c.points=f,c;a=new mxPolyline(f,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(n.graph.getView().getOverlayPane());return a};H=function(a,b){if(a&&null!=n.guidesArrHor)for(var c=0;c<n.guidesArrHor.length;c++)n.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=n.guidesArrVer)for(c=0;c<n.guidesArrVer.length;c++)n.guidesArrVer[c].node.style.visibility="hidden"};if(1<A&&A==y.length-1){A=[];F=n.guidesArrHor;d=[];h=0;l=y[0]==q?1:0;B=y[l].y+y[l].height;if(0<D)for(l=0;l<y.length-1;l++)u=
+y[l],G=y[l+1],q==u?(h=G.x-u.width-D,d.push(new mxPoint(h+u.width+I,B)),d.push(new mxPoint(G.x-I,B))):q==G?(d.push(new mxPoint(u.x+u.width+I,B)),h=u.x+u.width+D,d.push(new mxPoint(h-I,B))):(d.push(new mxPoint(u.x+u.width+I,B)),d.push(new mxPoint(G.x-I,B)));else u=y[0],l=y[2],h=u.x+u.width+(l.x-u.x-u.width-q.width)/2,d.push(new mxPoint(u.x+u.width+I,B)),d.push(new mxPoint(h-I,B)),d.push(new mxPoint(h+q.width+I,B)),d.push(new mxPoint(l.x-I,B));for(l=0;l<d.length;l+=2)y=d[l],D=d[l+1],y=v(y,D,null!=F?
+F[l/2]:null),y.node.style.visibility="visible",y.redraw(),A.push(y);for(l=d.length/2;null!=F&&l<F.length;l++)F[l].destroy();n.guidesArrHor=A;h-=b.x;d=!0}else H(!0);if(1<z&&z==w.length-1){A=[];F=n.guidesArrVer;g=[];f=0;l=w[0]==q?1:0;z=w[l].x+w[l].width;if(0<x)for(l=0;l<w.length-1;l++)u=w[l],G=w[l+1],q==u?(f=G.y-u.height-x,g.push(new mxPoint(z,f+u.height+I)),g.push(new mxPoint(z,G.y-I))):q==G?(g.push(new mxPoint(z,u.y+u.height+I)),f=u.y+u.height+x,g.push(new mxPoint(z,f-I))):(g.push(new mxPoint(z,u.y+
+u.height+I)),g.push(new mxPoint(z,G.y-I)));else u=w[0],l=w[2],f=u.y+u.height+(l.y-u.y-u.height-q.height)/2,g.push(new mxPoint(z,u.y+u.height+I)),g.push(new mxPoint(z,f-I)),g.push(new mxPoint(z,f+q.height+I)),g.push(new mxPoint(z,l.y-I));for(l=0;l<g.length;l+=2)y=g[l],D=g[l+1],y=v(y,D,null!=F?F[l/2]:null,!0),y.node.style.visibility="visible",y.redraw(),A.push(y);for(l=g.length/2;null!=F&&l<F.length;l++)F[l].destroy();n.guidesArrVer=A;f-=b.y;g=!0}else H(!1,!0)}if(d||g)return q=new mxPoint(h,f),w=a.call(this,
+b,q,k,m),d&&!g?q.y=w.y:g&&!d&&(q.x=w.x),w.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),w.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;H(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,f=this.guidesArrHor;if(null!=b)for(var m=0;m<b.length;m++)b[m].node.style.visibility=a?"visible":"hidden";if(null!=
 f)for(m=0;m<f.length;m++)f[m].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var k=0;k<a.length;k++)a[k].destroy();this.guidesArrVer=null}if(null!=c){for(k=0;k<c.length;k++)c[k].destroy();this.guidesArrHor=null}}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
 Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;
 LucidImporter={};
diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js
index 54625722e..1d6c6609d 100644
--- a/src/main/webapp/js/diagramly/DrawioFileSync.js
+++ b/src/main/webapp/js/diagramly/DrawioFileSync.js
@@ -716,7 +716,7 @@ DrawioFileSync.prototype.catchup = function(etag, secret, success, error, abort)
 		var doCatchup = mxUtils.bind(this, function()
 		{
 			// Ignores patch if shadow has changed
-			if (current == etag)
+			if (current != this.file.getCurrentEtag())
 			{
 				if (success != null)
 				{
@@ -741,7 +741,7 @@ DrawioFileSync.prototype.catchup = function(etag, secret, success, error, abort)
 					this.file.stats.bytesReceived += req.getText().length;	
 					
 					// Ignores patch if shadow has changed
-					if (current == etag)
+					if (current != this.file.getCurrentEtag())
 					{
 						if (success != null)
 						{
@@ -922,6 +922,9 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
 				var from = this.ui.hashValue(this.file.getCurrentEtag());
 				var to = this.ui.hashValue(etag);
 				
+				currentDetails.inConflictState = this.file.inConflictState;
+				currentDetails.invalidChecksum = this.file.invalidChecksum;
+				
 				this.file.checksumError(error, patches,
 					'From: ' + from +
 					'\nTo: ' + to +
@@ -1063,9 +1066,6 @@ DrawioFileSync.prototype.fileSaved = function(pages, lastDesc, success, error)
 			var details = {v: EditorUi.VERSION, t: new Date().toISOString(), ua: navigator.userAgent};
 			var checksum = this.ui.getHashValueForPages(pages, details);
 			var diff = this.ui.diffPages(shadow, pages);
-
-			// Debugging
-			details.lastChecksum = this.ui.getHashValueForPages(shadow);
 			
 			// Data is stored in cache and message is sent to all listeners
 			var etag = this.file.getDescriptorEtag(lastDesc);
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index 13ea276a5..e3b435a95 100644
--- a/src/main/webapp/js/embed-static.min.js
+++ b/src/main/webapp/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
 e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
 "function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
 "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.38",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.39",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index 4bd6f79c5..25a7cae90 100644
--- a/src/main/webapp/js/reader.min.js
+++ b/src/main/webapp/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
 e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
 "function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
 "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.38",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.39",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
-- 
GitLab